R_CK_C_Initialize_Param * r_ck_c_initialize_1(R_CK_C_Initialize_Param *param, CLIENT *cl) {
}
R_CK_C_Initialize_Param * r_ck_c_initialize_1_svc(R_CK_C_Initialize_Param *in, struct svc_req *req) {
	printf("CK_C_Initialize\n");
	fflush(stdin);
	static R_CK_C_Initialize_Param out;
	static CK_VOID_PTR pReserved;
	// Free Unwrapping
	free(pReserved);
	pReserved = NULL;
	// End Free Unwrapping
	// Unwrapping
	if (in->pReserved == NULL) {
		pReserved = NULL;
	}
	else {
		pReserved = malloc(sizeof(int));
		memcpy(pReserved, in->pReserved, sizeof(int));
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_Initialize(pReserved);
	// Free Wrapping
	// End Free Wrapping
	// Wrapping
	out.pReserved = pReserved;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_Finalize_Param * r_ck_c_finalize_1(R_CK_C_Finalize_Param *param, CLIENT *cl) {
}
R_CK_C_Finalize_Param * r_ck_c_finalize_1_svc(R_CK_C_Finalize_Param *in, struct svc_req *req) {
	printf("CK_C_Finalize\n");
	fflush(stdin);
	static R_CK_C_Finalize_Param out;
	static CK_VOID_PTR pReserved;
	// Free Unwrapping
	free(pReserved);
	pReserved = NULL;
	// End Free Unwrapping
	// Unwrapping
	if (in->pReserved == NULL) {
		pReserved = NULL;
	}
	else {
		pReserved = malloc(sizeof(int));
		memcpy(pReserved, in->pReserved, sizeof(int));
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_Finalize(pReserved);
	// Free Wrapping
	// End Free Wrapping
	// Wrapping
	out.pReserved = pReserved;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_Terminate_Param * r_ck_c_terminate_1(R_CK_C_Terminate_Param *param, CLIENT *cl) {
}
R_CK_C_Terminate_Param * r_ck_c_terminate_1_svc(R_CK_C_Terminate_Param *in, struct svc_req *req) {
	printf("CK_C_Terminate\n");
	fflush(stdin);
	static R_CK_C_Terminate_Param out;
	// Free Unwrapping
	// End Free Unwrapping
	// Unwrapping
	// End Unwrapping
	//Remote calling
	CK_RV res = C_Terminate();
	// Free Wrapping
	// End Free Wrapping
	// Wrapping
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_GetInfo_Param * r_ck_c_getinfo_1(R_CK_C_GetInfo_Param *param, CLIENT *cl) {
}
R_CK_C_GetInfo_Param * r_ck_c_getinfo_1_svc(R_CK_C_GetInfo_Param *in, struct svc_req *req) {
	printf("CK_C_GetInfo\n");
	fflush(stdin);
	static R_CK_C_GetInfo_Param out;
	static CK_INFO_PTR pInfo;
	// Free Unwrapping
	free(pInfo);
	pInfo = NULL;
	// End Free Unwrapping
	// Unwrapping
	if (in->pInfo == NULL) {
		pInfo = NULL;
	}
	else {
		pInfo = malloc(sizeof(CK_INFO));
		pInfo->cryptokiVersion.major = in->pInfo->cryptokiVersion.major;
		pInfo->cryptokiVersion.minor = in->pInfo->cryptokiVersion.minor;
		memcpy(pInfo->manufacturerID, in->pInfo->manufacturerID, 32);
		pInfo->flags = in->pInfo->flags;
		memcpy(pInfo->libraryDescription, in->pInfo->libraryDescription, 32);
		pInfo->libraryVersion.major = in->pInfo->libraryVersion.major;
		pInfo->libraryVersion.minor = in->pInfo->libraryVersion.minor;
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_GetInfo(pInfo);
	// Free Wrapping
	free(out.pInfo);
	out.pInfo = NULL;
	// End Free Wrapping
	// Wrapping
	if (pInfo == NULL) {
		out.pInfo = NULL;
	}
	else {
		out.pInfo = malloc(sizeof(REMOTE_CK_INFO));
		out.pInfo->cryptokiVersion.major = pInfo->cryptokiVersion.major;
		out.pInfo->cryptokiVersion.minor = pInfo->cryptokiVersion.minor;
		memcpy(out.pInfo->manufacturerID, pInfo->manufacturerID, 32);
		out.pInfo->flags = pInfo->flags;
		memcpy(out.pInfo->libraryDescription, pInfo->libraryDescription, 32);
		out.pInfo->libraryVersion.major = pInfo->libraryVersion.major;
		out.pInfo->libraryVersion.minor = pInfo->libraryVersion.minor;
	}
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_GetSlotList_Param * r_ck_c_getslotlist_1(R_CK_C_GetSlotList_Param *param, CLIENT *cl) {
}
R_CK_C_GetSlotList_Param * r_ck_c_getslotlist_1_svc(R_CK_C_GetSlotList_Param *in, struct svc_req *req) {
	printf("CK_C_GetSlotList\n");
	fflush(stdin);
	static R_CK_C_GetSlotList_Param out;
	static CK_BBOOL tokenPresent;
	static CK_SLOT_ID_PTR pSlotList;
	static CK_ULONG_PTR pusCount;
	// Free Unwrapping
	free(pSlotList);
	pSlotList = NULL;
	free(pusCount);
	pusCount = NULL;
	// End Free Unwrapping
	// Unwrapping
	tokenPresent = in->tokenPresent;
	if (in->pSlotList.pSlotList_len == 0) {
		pSlotList = NULL;
	}
	else {
		pSlotList = malloc(sizeof(CK_SLOT_ID) * in->pSlotList.pSlotList_len);
		memcpy(pSlotList, in->pSlotList.pSlotList_val, sizeof(CK_SLOT_ID) * in->pSlotList.pSlotList_len);
	}
	if (in->pusCount == NULL) {
		pusCount = NULL;
	}
	else {
		pusCount = malloc(sizeof(CK_ULONG));
		memcpy(pusCount, in->pusCount, sizeof(CK_ULONG));
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_GetSlotList(tokenPresent,pSlotList,pusCount);
	// Free Wrapping
	free(out.pSlotList.pSlotList_val);
	out.pSlotList.pSlotList_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.tokenPresent = tokenPresent;
	if (pSlotList == NULL) {
		out.pSlotList.pSlotList_val = NULL;
		out.pSlotList.pSlotList_len = 0;
	}
	else {
		out.pSlotList.pSlotList_val = malloc(sizeof(REMOTE_CK_SLOT_ID) * (*pusCount));
		memcpy(out.pSlotList.pSlotList_val, pSlotList, sizeof(CK_SLOT_ID) * (*pusCount));
	}
	out.pusCount = pusCount;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_GetSlotInfo_Param * r_ck_c_getslotinfo_1(R_CK_C_GetSlotInfo_Param *param, CLIENT *cl) {
}
R_CK_C_GetSlotInfo_Param * r_ck_c_getslotinfo_1_svc(R_CK_C_GetSlotInfo_Param *in, struct svc_req *req) {
	printf("CK_C_GetSlotInfo\n");
	fflush(stdin);
	static R_CK_C_GetSlotInfo_Param out;
	static CK_SLOT_ID slotID;
	static CK_SLOT_INFO_PTR pInfo;
	// Free Unwrapping
	free(pInfo);
	pInfo = NULL;
	// End Free Unwrapping
	// Unwrapping
	slotID = in->slotID;
	if (in->pInfo == NULL) {
		pInfo = NULL;
	}
	else {
		pInfo = malloc(sizeof(CK_SLOT_INFO));
		memcpy(pInfo->slotDescription, in->pInfo->slotDescription, 64);
		memcpy(pInfo->manufacturerID, in->pInfo->manufacturerID, 32);
		pInfo->flags = in->pInfo->flags;
		pInfo->hardwareVersion.major = in->pInfo->hardwareVersion.major;
		pInfo->hardwareVersion.minor = in->pInfo->hardwareVersion.minor;
		pInfo->firmwareVersion.major = in->pInfo->firmwareVersion.major;
		pInfo->firmwareVersion.minor = in->pInfo->firmwareVersion.minor;
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_GetSlotInfo(slotID,pInfo);
	// Free Wrapping
	free(out.pInfo);
	out.pInfo = NULL;
	// End Free Wrapping
	// Wrapping
	out.slotID = slotID;
	if (pInfo == NULL) {
		out.pInfo = NULL;
	}
	else {
		out.pInfo = malloc(sizeof(REMOTE_CK_SLOT_INFO));
		memcpy(out.pInfo->slotDescription, pInfo->slotDescription, 64);
		memcpy(out.pInfo->manufacturerID, pInfo->manufacturerID, 32);
		out.pInfo->flags = pInfo->flags;
		out.pInfo->hardwareVersion.major = pInfo->hardwareVersion.major;
		out.pInfo->hardwareVersion.minor = pInfo->hardwareVersion.minor;
		out.pInfo->firmwareVersion.major = pInfo->firmwareVersion.major;
		out.pInfo->firmwareVersion.minor = pInfo->firmwareVersion.minor;
	}
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_GetTokenInfo_Param * r_ck_c_gettokeninfo_1(R_CK_C_GetTokenInfo_Param *param, CLIENT *cl) {
}
R_CK_C_GetTokenInfo_Param * r_ck_c_gettokeninfo_1_svc(R_CK_C_GetTokenInfo_Param *in, struct svc_req *req) {
	printf("CK_C_GetTokenInfo\n");
	fflush(stdin);
	static R_CK_C_GetTokenInfo_Param out;
	static CK_SLOT_ID slotID;
	static CK_TOKEN_INFO_PTR pInfo;
	// Free Unwrapping
	free(pInfo);
	pInfo = NULL;
	// End Free Unwrapping
	// Unwrapping
	slotID = in->slotID;
	if (in->pInfo == NULL) {
		pInfo = NULL;
	}
	else {
		pInfo = malloc(sizeof(CK_TOKEN_INFO));
		memcpy(pInfo->label, in->pInfo->label, 32);
		memcpy(pInfo->manufacturerID, in->pInfo->manufacturerID, 32);
		memcpy(pInfo->model, in->pInfo->model, 16);
		memcpy(pInfo->serialNumber, in->pInfo->serialNumber, 16);
		pInfo->flags = in->pInfo->flags;
		pInfo->ulMaxSessionCount = in->pInfo->ulMaxSessionCount;
		pInfo->ulSessionCount = in->pInfo->ulSessionCount;
		pInfo->ulMaxRwSessionCount = in->pInfo->ulMaxRwSessionCount;
		pInfo->ulRwSessionCount = in->pInfo->ulRwSessionCount;
		pInfo->ulMaxPinLen = in->pInfo->ulMaxPinLen;
		pInfo->ulMinPinLen = in->pInfo->ulMinPinLen;
		pInfo->ulTotalPublicMemory = in->pInfo->ulTotalPublicMemory;
		pInfo->ulFreePublicMemory = in->pInfo->ulFreePublicMemory;
		pInfo->ulTotalPrivateMemory = in->pInfo->ulTotalPrivateMemory;
		pInfo->ulFreePrivateMemory = in->pInfo->ulFreePrivateMemory;
		pInfo->hardwareVersion.major = in->pInfo->hardwareVersion.major;
		pInfo->hardwareVersion.minor = in->pInfo->hardwareVersion.minor;
		pInfo->firmwareVersion.major = in->pInfo->firmwareVersion.major;
		pInfo->firmwareVersion.minor = in->pInfo->firmwareVersion.minor;
		memcpy(pInfo->utcTime, in->pInfo->utcTime, 16);
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_GetTokenInfo(slotID,pInfo);
	// Free Wrapping
	free(out.pInfo);
	out.pInfo = NULL;
	// End Free Wrapping
	// Wrapping
	out.slotID = slotID;
	if (pInfo == NULL) {
		out.pInfo = NULL;
	}
	else {
		out.pInfo = malloc(sizeof(REMOTE_CK_TOKEN_INFO));
		memcpy(out.pInfo->label, pInfo->label, 32);
		memcpy(out.pInfo->manufacturerID, pInfo->manufacturerID, 32);
		memcpy(out.pInfo->model, pInfo->model, 16);
		memcpy(out.pInfo->serialNumber, pInfo->serialNumber, 16);
		out.pInfo->flags = pInfo->flags;
		out.pInfo->ulMaxSessionCount = pInfo->ulMaxSessionCount;
		out.pInfo->ulSessionCount = pInfo->ulSessionCount;
		out.pInfo->ulMaxRwSessionCount = pInfo->ulMaxRwSessionCount;
		out.pInfo->ulRwSessionCount = pInfo->ulRwSessionCount;
		out.pInfo->ulMaxPinLen = pInfo->ulMaxPinLen;
		out.pInfo->ulMinPinLen = pInfo->ulMinPinLen;
		out.pInfo->ulTotalPublicMemory = pInfo->ulTotalPublicMemory;
		out.pInfo->ulFreePublicMemory = pInfo->ulFreePublicMemory;
		out.pInfo->ulTotalPrivateMemory = pInfo->ulTotalPrivateMemory;
		out.pInfo->ulFreePrivateMemory = pInfo->ulFreePrivateMemory;
		out.pInfo->hardwareVersion.major = pInfo->hardwareVersion.major;
		out.pInfo->hardwareVersion.minor = pInfo->hardwareVersion.minor;
		out.pInfo->firmwareVersion.major = pInfo->firmwareVersion.major;
		out.pInfo->firmwareVersion.minor = pInfo->firmwareVersion.minor;
		memcpy(out.pInfo->utcTime, pInfo->utcTime, 16);
	}
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_GetMechanismList_Param * r_ck_c_getmechanismlist_1(R_CK_C_GetMechanismList_Param *param, CLIENT *cl) {
}
R_CK_C_GetMechanismList_Param * r_ck_c_getmechanismlist_1_svc(R_CK_C_GetMechanismList_Param *in, struct svc_req *req) {
	printf("CK_C_GetMechanismList\n");
	fflush(stdin);
	static R_CK_C_GetMechanismList_Param out;
	static CK_SLOT_ID slotID;
	static CK_MECHANISM_TYPE_PTR pMechanismList;
	static CK_ULONG_PTR pusCount;
	// Free Unwrapping
	free(pMechanismList);
	pMechanismList = NULL;
	free(pusCount);
	pusCount = NULL;
	// End Free Unwrapping
	// Unwrapping
	slotID = in->slotID;
	if (in->pMechanismList.pMechanismList_len == 0) {
		pMechanismList = NULL;
	}
	else {
		pMechanismList = malloc(sizeof(CK_MECHANISM_TYPE) * in->pMechanismList.pMechanismList_len);
		memcpy(pMechanismList, in->pMechanismList.pMechanismList_val, sizeof(CK_MECHANISM_TYPE) * in->pMechanismList.pMechanismList_len);
	}
	if (in->pusCount == NULL) {
		pusCount = NULL;
	}
	else {
		pusCount = malloc(sizeof(CK_ULONG));
		memcpy(pusCount, in->pusCount, sizeof(CK_ULONG));
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_GetMechanismList(slotID,pMechanismList,pusCount);
	// Free Wrapping
	free(out.pMechanismList.pMechanismList_val);
	out.pMechanismList.pMechanismList_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.slotID = slotID;
	if (pMechanismList == NULL) {
		out.pMechanismList.pMechanismList_val = NULL;
		out.pMechanismList.pMechanismList_len = 0;
	}
	else {
		out.pMechanismList.pMechanismList_val = malloc(sizeof(REMOTE_CK_MECHANISM_TYPE) * (*pusCount));
		memcpy(out.pMechanismList.pMechanismList_val, pMechanismList, sizeof(CK_MECHANISM_TYPE) * (*pusCount));
	}
	out.pusCount = pusCount;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_GetMechanismInfo_Param * r_ck_c_getmechanisminfo_1(R_CK_C_GetMechanismInfo_Param *param, CLIENT *cl) {
}
R_CK_C_GetMechanismInfo_Param * r_ck_c_getmechanisminfo_1_svc(R_CK_C_GetMechanismInfo_Param *in, struct svc_req *req) {
	printf("CK_C_GetMechanismInfo\n");
	fflush(stdin);
	static R_CK_C_GetMechanismInfo_Param out;
	static CK_SLOT_ID slotID;
	static CK_MECHANISM_TYPE type;
	static CK_MECHANISM_INFO_PTR pInfo;
	// Free Unwrapping
	free(pInfo);
	pInfo = NULL;
	// End Free Unwrapping
	// Unwrapping
	slotID = in->slotID;
	type = in->type;
	if (in->pInfo == NULL) {
		pInfo = NULL;
	}
	else {
		pInfo = malloc(sizeof(CK_MECHANISM_INFO));
		pInfo->ulMinKeySize = in->pInfo->ulMinKeySize;
		pInfo->ulMaxKeySize = in->pInfo->ulMaxKeySize;
		pInfo->flags = in->pInfo->flags;
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_GetMechanismInfo(slotID,type,pInfo);
	// Free Wrapping
	free(out.pInfo);
	out.pInfo = NULL;
	// End Free Wrapping
	// Wrapping
	out.slotID = slotID;
	out.type = type;
	if (pInfo == NULL) {
		out.pInfo = NULL;
	}
	else {
		out.pInfo = malloc(sizeof(REMOTE_CK_MECHANISM_INFO));
		out.pInfo->ulMinKeySize = pInfo->ulMinKeySize;
		out.pInfo->ulMaxKeySize = pInfo->ulMaxKeySize;
		out.pInfo->flags = pInfo->flags;
	}
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_InitToken_Param * r_ck_c_inittoken_1(R_CK_C_InitToken_Param *param, CLIENT *cl) {
}
R_CK_C_InitToken_Param * r_ck_c_inittoken_1_svc(R_CK_C_InitToken_Param *in, struct svc_req *req) {
	printf("CK_C_InitToken\n");
	fflush(stdin);
	static R_CK_C_InitToken_Param out;
	static CK_SLOT_ID slotID;
	static CK_CHAR_PTR pPin;
	static CK_ULONG usPinLen;
	static CK_CHAR_PTR pLabel;
	// Free Unwrapping
	free(pPin);
	pPin = NULL;
	free(pLabel);
	pLabel = NULL;
	// End Free Unwrapping
	// Unwrapping
	slotID = in->slotID;
	if (in->pPin.pPin_len == 0) {
		pPin = NULL;
	}
	else {
		pPin = malloc(sizeof(CK_CHAR) * in->pPin.pPin_len);
		memcpy(pPin, in->pPin.pPin_val, sizeof(CK_CHAR) * in->pPin.pPin_len);
	}
	usPinLen = in->usPinLen;
	if (in->pLabel.pLabel_len == 0) {
		pLabel = NULL;
	}
	else {
		pLabel = malloc(sizeof(CK_CHAR) * in->pLabel.pLabel_len);
		memcpy(pLabel, in->pLabel.pLabel_val, sizeof(CK_CHAR) * in->pLabel.pLabel_len);
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_InitToken(slotID,pPin,usPinLen,pLabel);
	// Free Wrapping
	free(out.pPin.pPin_val);
	out.pPin.pPin_val = NULL;
	free(out.pLabel.pLabel_val);
	out.pLabel.pLabel_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.slotID = slotID;
	if (pPin == NULL) {
		out.pPin.pPin_val = NULL;
		out.pPin.pPin_len = 0;
	}
	else {
		out.pPin.pPin_val = malloc(sizeof(REMOTE_CK_CHAR) * usPinLen);
		memcpy(out.pPin.pPin_val, pPin, sizeof(CK_CHAR) * usPinLen);
	}
	out.usPinLen = usPinLen;
	if (pLabel == NULL) {
		out.pLabel.pLabel_val = NULL;
		out.pLabel.pLabel_len = 0;
	}
	else {
		out.pLabel.pLabel_val = malloc(sizeof(REMOTE_CK_CHAR) * 32);
		memcpy(out.pLabel.pLabel_val, pLabel, sizeof(CK_CHAR) * 32);
	}
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_InitPIN_Param * r_ck_c_initpin_1(R_CK_C_InitPIN_Param *param, CLIENT *cl) {
}
R_CK_C_InitPIN_Param * r_ck_c_initpin_1_svc(R_CK_C_InitPIN_Param *in, struct svc_req *req) {
	printf("CK_C_InitPIN\n");
	fflush(stdin);
	static R_CK_C_InitPIN_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_CHAR_PTR pPin;
	static CK_ULONG usPinLen;
	// Free Unwrapping
	free(pPin);
	pPin = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pPin.pPin_len == 0) {
		pPin = NULL;
	}
	else {
		pPin = malloc(sizeof(CK_CHAR) * in->pPin.pPin_len);
		memcpy(pPin, in->pPin.pPin_val, sizeof(CK_CHAR) * in->pPin.pPin_len);
	}
	usPinLen = in->usPinLen;
	// End Unwrapping
	//Remote calling
	CK_RV res = C_InitPIN(hSession,pPin,usPinLen);
	// Free Wrapping
	free(out.pPin.pPin_val);
	out.pPin.pPin_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pPin == NULL) {
		out.pPin.pPin_val = NULL;
		out.pPin.pPin_len = 0;
	}
	else {
		out.pPin.pPin_val = malloc(sizeof(REMOTE_CK_CHAR) * usPinLen);
		memcpy(out.pPin.pPin_val, pPin, sizeof(CK_CHAR) * usPinLen);
	}
	out.usPinLen = usPinLen;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_SetPIN_Param * r_ck_c_setpin_1(R_CK_C_SetPIN_Param *param, CLIENT *cl) {
}
R_CK_C_SetPIN_Param * r_ck_c_setpin_1_svc(R_CK_C_SetPIN_Param *in, struct svc_req *req) {
	printf("CK_C_SetPIN\n");
	fflush(stdin);
	static R_CK_C_SetPIN_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_CHAR_PTR pOldPin;
	static CK_ULONG usOldLen;
	static CK_CHAR_PTR pNewPin;
	static CK_ULONG usNewLen;
	// Free Unwrapping
	free(pOldPin);
	pOldPin = NULL;
	free(pNewPin);
	pNewPin = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pOldPin.pOldPin_len == 0) {
		pOldPin = NULL;
	}
	else {
		pOldPin = malloc(sizeof(CK_CHAR) * in->pOldPin.pOldPin_len);
		memcpy(pOldPin, in->pOldPin.pOldPin_val, sizeof(CK_CHAR) * in->pOldPin.pOldPin_len);
	}
	usOldLen = in->usOldLen;
	if (in->pNewPin.pNewPin_len == 0) {
		pNewPin = NULL;
	}
	else {
		pNewPin = malloc(sizeof(CK_CHAR) * in->pNewPin.pNewPin_len);
		memcpy(pNewPin, in->pNewPin.pNewPin_val, sizeof(CK_CHAR) * in->pNewPin.pNewPin_len);
	}
	usNewLen = in->usNewLen;
	// End Unwrapping
	//Remote calling
	CK_RV res = C_SetPIN(hSession,pOldPin,usOldLen,pNewPin,usNewLen);
	// Free Wrapping
	free(out.pOldPin.pOldPin_val);
	out.pOldPin.pOldPin_val = NULL;
	free(out.pNewPin.pNewPin_val);
	out.pNewPin.pNewPin_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pOldPin == NULL) {
		out.pOldPin.pOldPin_val = NULL;
		out.pOldPin.pOldPin_len = 0;
	}
	else {
		out.pOldPin.pOldPin_val = malloc(sizeof(REMOTE_CK_CHAR) * usOldLen);
		memcpy(out.pOldPin.pOldPin_val, pOldPin, sizeof(CK_CHAR) * usOldLen);
	}
	out.usOldLen = usOldLen;
	if (pNewPin == NULL) {
		out.pNewPin.pNewPin_val = NULL;
		out.pNewPin.pNewPin_len = 0;
	}
	else {
		out.pNewPin.pNewPin_val = malloc(sizeof(REMOTE_CK_CHAR) * usNewLen);
		memcpy(out.pNewPin.pNewPin_val, pNewPin, sizeof(CK_CHAR) * usNewLen);
	}
	out.usNewLen = usNewLen;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_OpenSession_Param * r_ck_c_opensession_1(R_CK_C_OpenSession_Param *param, CLIENT *cl) {
}
R_CK_C_OpenSession_Param * r_ck_c_opensession_1_svc(R_CK_C_OpenSession_Param *in, struct svc_req *req) {
	printf("CK_C_OpenSession\n");
	fflush(stdin);
	static R_CK_C_OpenSession_Param out;
	static CK_SLOT_ID slotID;
	static CK_FLAGS flags;
	static CK_VOID_PTR pApplication;
	static CK_VOID_PTR notify;
	static CK_SESSION_HANDLE_PTR phSession;
	// Free Unwrapping
	free(pApplication);
	pApplication = NULL;
	free(notify);
	notify = NULL;
	free(phSession);
	phSession = NULL;
	// End Free Unwrapping
	// Unwrapping
	slotID = in->slotID;
	flags = in->flags;
	if (in->pApplication == NULL) {
		pApplication = NULL;
	}
	else {
		pApplication = malloc(sizeof(int));
		memcpy(pApplication, in->pApplication, sizeof(int));
	}
	if (in->notify == NULL) {
		notify = NULL;
	}
	else {
		notify = malloc(sizeof(int));
		memcpy(notify, in->notify, sizeof(int));
	}
	if (in->phSession == NULL) {
		phSession = NULL;
	}
	else {
		phSession = malloc(sizeof(CK_SESSION_HANDLE));
		memcpy(phSession, in->phSession, sizeof(CK_SESSION_HANDLE));
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_OpenSession(slotID,flags,pApplication,notify,phSession);
	// Free Wrapping
	// End Free Wrapping
	// Wrapping
	out.slotID = slotID;
	out.flags = flags;
	out.pApplication = pApplication;
	out.notify = notify;
	out.phSession = phSession;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_CloseSession_Param * r_ck_c_closesession_1(R_CK_C_CloseSession_Param *param, CLIENT *cl) {
}
R_CK_C_CloseSession_Param * r_ck_c_closesession_1_svc(R_CK_C_CloseSession_Param *in, struct svc_req *req) {
	printf("CK_C_CloseSession\n");
	fflush(stdin);
	static R_CK_C_CloseSession_Param out;
	static CK_SESSION_HANDLE hSession;
	// Free Unwrapping
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	// End Unwrapping
	//Remote calling
	CK_RV res = C_CloseSession(hSession);
	// Free Wrapping
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_CloseAllSessions_Param * r_ck_c_closeallsessions_1(R_CK_C_CloseAllSessions_Param *param, CLIENT *cl) {
}
R_CK_C_CloseAllSessions_Param * r_ck_c_closeallsessions_1_svc(R_CK_C_CloseAllSessions_Param *in, struct svc_req *req) {
	printf("CK_C_CloseAllSessions\n");
	fflush(stdin);
	static R_CK_C_CloseAllSessions_Param out;
	static CK_SLOT_ID slotID;
	// Free Unwrapping
	// End Free Unwrapping
	// Unwrapping
	slotID = in->slotID;
	// End Unwrapping
	//Remote calling
	CK_RV res = C_CloseAllSessions(slotID);
	// Free Wrapping
	// End Free Wrapping
	// Wrapping
	out.slotID = slotID;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_GetSessionInfo_Param * r_ck_c_getsessioninfo_1(R_CK_C_GetSessionInfo_Param *param, CLIENT *cl) {
}
R_CK_C_GetSessionInfo_Param * r_ck_c_getsessioninfo_1_svc(R_CK_C_GetSessionInfo_Param *in, struct svc_req *req) {
	printf("CK_C_GetSessionInfo\n");
	fflush(stdin);
	static R_CK_C_GetSessionInfo_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_SESSION_INFO_PTR pInfo;
	// Free Unwrapping
	free(pInfo);
	pInfo = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pInfo == NULL) {
		pInfo = NULL;
	}
	else {
		pInfo = malloc(sizeof(CK_SESSION_INFO));
		pInfo->slotID = in->pInfo->slotID;
		pInfo->state = in->pInfo->state;
		pInfo->flags = in->pInfo->flags;
		pInfo->ulDeviceError = in->pInfo->ulDeviceError;
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_GetSessionInfo(hSession,pInfo);
	// Free Wrapping
	free(out.pInfo);
	out.pInfo = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pInfo == NULL) {
		out.pInfo = NULL;
	}
	else {
		out.pInfo = malloc(sizeof(REMOTE_CK_SESSION_INFO));
		out.pInfo->slotID = pInfo->slotID;
		out.pInfo->state = pInfo->state;
		out.pInfo->flags = pInfo->flags;
		out.pInfo->ulDeviceError = pInfo->ulDeviceError;
	}
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_GetOperationState_Param * r_ck_c_getoperationstate_1(R_CK_C_GetOperationState_Param *param, CLIENT *cl) {
}
R_CK_C_GetOperationState_Param * r_ck_c_getoperationstate_1_svc(R_CK_C_GetOperationState_Param *in, struct svc_req *req) {
	printf("CK_C_GetOperationState\n");
	fflush(stdin);
	static R_CK_C_GetOperationState_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_BYTE_PTR pOperationState;
	static CK_ULONG_PTR pulOperationStateLen;
	// Free Unwrapping
	free(pOperationState);
	pOperationState = NULL;
	free(pulOperationStateLen);
	pulOperationStateLen = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pOperationState.pOperationState_len == 0) {
		pOperationState = NULL;
	}
	else {
		pOperationState = malloc(sizeof(CK_BYTE) * in->pOperationState.pOperationState_len);
		memcpy(pOperationState, in->pOperationState.pOperationState_val, sizeof(CK_BYTE) * in->pOperationState.pOperationState_len);
	}
	if (in->pulOperationStateLen == NULL) {
		pulOperationStateLen = NULL;
	}
	else {
		pulOperationStateLen = malloc(sizeof(CK_ULONG));
		memcpy(pulOperationStateLen, in->pulOperationStateLen, sizeof(CK_ULONG));
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_GetOperationState(hSession,pOperationState,pulOperationStateLen);
	// Free Wrapping
	free(out.pOperationState.pOperationState_val);
	out.pOperationState.pOperationState_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pOperationState == NULL) {
		out.pOperationState.pOperationState_val = NULL;
		out.pOperationState.pOperationState_len = 0;
	}
	else {
		out.pOperationState.pOperationState_val = malloc(sizeof(REMOTE_CK_BYTE) * (*pulOperationStateLen));
		memcpy(out.pOperationState.pOperationState_val, pOperationState, sizeof(CK_BYTE) * (*pulOperationStateLen));
	}
	out.pulOperationStateLen = pulOperationStateLen;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_SetOperationState_Param * r_ck_c_setoperationstate_1(R_CK_C_SetOperationState_Param *param, CLIENT *cl) {
}
R_CK_C_SetOperationState_Param * r_ck_c_setoperationstate_1_svc(R_CK_C_SetOperationState_Param *in, struct svc_req *req) {
	printf("CK_C_SetOperationState\n");
	fflush(stdin);
	static R_CK_C_SetOperationState_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_BYTE_PTR pOperationState;
	static CK_ULONG ulOperationStateLen;
	static CK_OBJECT_HANDLE hEncryptionKey;
	static CK_OBJECT_HANDLE hAuthenticationKey;
	// Free Unwrapping
	free(pOperationState);
	pOperationState = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pOperationState.pOperationState_len == 0) {
		pOperationState = NULL;
	}
	else {
		pOperationState = malloc(sizeof(CK_BYTE) * in->pOperationState.pOperationState_len);
		memcpy(pOperationState, in->pOperationState.pOperationState_val, sizeof(CK_BYTE) * in->pOperationState.pOperationState_len);
	}
	ulOperationStateLen = in->ulOperationStateLen;
	hEncryptionKey = in->hEncryptionKey;
	hAuthenticationKey = in->hAuthenticationKey;
	// End Unwrapping
	//Remote calling
	CK_RV res = C_SetOperationState(hSession,pOperationState,ulOperationStateLen,hEncryptionKey,hAuthenticationKey);
	// Free Wrapping
	free(out.pOperationState.pOperationState_val);
	out.pOperationState.pOperationState_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pOperationState == NULL) {
		out.pOperationState.pOperationState_val = NULL;
		out.pOperationState.pOperationState_len = 0;
	}
	else {
		out.pOperationState.pOperationState_val = malloc(sizeof(REMOTE_CK_BYTE) * ulOperationStateLen);
		memcpy(out.pOperationState.pOperationState_val, pOperationState, sizeof(CK_BYTE) * ulOperationStateLen);
	}
	out.ulOperationStateLen = ulOperationStateLen;
	out.hEncryptionKey = hEncryptionKey;
	out.hAuthenticationKey = hAuthenticationKey;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_Login_Param * r_ck_c_login_1(R_CK_C_Login_Param *param, CLIENT *cl) {
}
R_CK_C_Login_Param * r_ck_c_login_1_svc(R_CK_C_Login_Param *in, struct svc_req *req) {
	printf("CK_C_Login\n");
	fflush(stdin);
	static R_CK_C_Login_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_USER_TYPE userType;
	static CK_CHAR_PTR pPin;
	static CK_ULONG usPinLen;
	// Free Unwrapping
	free(pPin);
	pPin = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	userType = in->userType;
	if (in->pPin.pPin_len == 0) {
		pPin = NULL;
	}
	else {
		pPin = malloc(sizeof(CK_CHAR) * in->pPin.pPin_len);
		memcpy(pPin, in->pPin.pPin_val, sizeof(CK_CHAR) * in->pPin.pPin_len);
	}
	usPinLen = in->usPinLen;
	// End Unwrapping
	//Remote calling
	CK_RV res = C_Login(hSession,userType,pPin,usPinLen);
	// Free Wrapping
	free(out.pPin.pPin_val);
	out.pPin.pPin_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	out.userType = userType;
	if (pPin == NULL) {
		out.pPin.pPin_val = NULL;
		out.pPin.pPin_len = 0;
	}
	else {
		out.pPin.pPin_val = malloc(sizeof(REMOTE_CK_CHAR) * usPinLen);
		memcpy(out.pPin.pPin_val, pPin, sizeof(CK_CHAR) * usPinLen);
	}
	out.usPinLen = usPinLen;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_Logout_Param * r_ck_c_logout_1(R_CK_C_Logout_Param *param, CLIENT *cl) {
}
R_CK_C_Logout_Param * r_ck_c_logout_1_svc(R_CK_C_Logout_Param *in, struct svc_req *req) {
	printf("CK_C_Logout\n");
	fflush(stdin);
	static R_CK_C_Logout_Param out;
	static CK_SESSION_HANDLE hSession;
	// Free Unwrapping
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	// End Unwrapping
	//Remote calling
	CK_RV res = C_Logout(hSession);
	// Free Wrapping
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_CreateObject_Param * r_ck_c_createobject_1(R_CK_C_CreateObject_Param *param, CLIENT *cl) {
}
R_CK_C_CreateObject_Param * r_ck_c_createobject_1_svc(R_CK_C_CreateObject_Param *in, struct svc_req *req) {
	printf("CK_C_CreateObject\n");
	fflush(stdin);
	static R_CK_C_CreateObject_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_ATTRIBUTE_PTR pTemplate;
	static CK_ULONG usCount;
	static CK_OBJECT_HANDLE_PTR phObject;
	// Free Unwrapping
	if (pTemplate != NULL) {
		CK_ATTRIBUTE *pLocal = pTemplate;
		free_unwrap_CK_ATTRIBUTE(pLocal, (int) usCount);
	}
	free(pTemplate);
	pTemplate = NULL;
	free(phObject);
	phObject = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pTemplate.pTemplate_len == 0) {
		pTemplate = NULL;
	}
	else {
		pTemplate = malloc(sizeof(CK_ATTRIBUTE) * in->pTemplate.pTemplate_len);
		CK_ATTRIBUTE *pLocal = pTemplate;
		REMOTE_CK_ATTRIBUTE *pRemote = in->pTemplate.pTemplate_val;
		unwrap_CK_ATTRIBUTE(pLocal, pRemote, &(in->usCount));
	}
	usCount = in->usCount;
	if (in->phObject == NULL) {
		phObject = NULL;
	}
	else {
		phObject = malloc(sizeof(CK_OBJECT_HANDLE));
		memcpy(phObject, in->phObject, sizeof(CK_OBJECT_HANDLE));
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_CreateObject(hSession,pTemplate,usCount,phObject);
	// Free Wrapping
	if (out.pTemplate.pTemplate_val != NULL) {
		REMOTE_CK_ATTRIBUTE *pRemote = out.pTemplate.pTemplate_val;
		free_wrap_CK_ATTRIBUTE(pRemote, (int) out.pTemplate.pTemplate_len);
	}
	free(out.pTemplate.pTemplate_val);
	out.pTemplate.pTemplate_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pTemplate == NULL) {
		out.pTemplate.pTemplate_val = NULL;
		out.pTemplate.pTemplate_len = 0;
	}
	else {
		out.pTemplate.pTemplate_val = malloc(sizeof(REMOTE_CK_ATTRIBUTE) * usCount);
		CK_ATTRIBUTE *pLocal = pTemplate;
		REMOTE_CK_ATTRIBUTE *pRemote = out.pTemplate.pTemplate_val;
		wrap_CK_ATTRIBUTE(pLocal, pRemote, &usCount);
	}
	out.usCount = usCount;
	out.phObject = phObject;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_CopyObject_Param * r_ck_c_copyobject_1(R_CK_C_CopyObject_Param *param, CLIENT *cl) {
}
R_CK_C_CopyObject_Param * r_ck_c_copyobject_1_svc(R_CK_C_CopyObject_Param *in, struct svc_req *req) {
	printf("CK_C_CopyObject\n");
	fflush(stdin);
	static R_CK_C_CopyObject_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_OBJECT_HANDLE hObject;
	static CK_ATTRIBUTE_PTR pTemplate;
	static CK_ULONG usCount;
	static CK_OBJECT_HANDLE_PTR phNewObject;
	// Free Unwrapping
	if (pTemplate != NULL) {
		CK_ATTRIBUTE *pLocal = pTemplate;
		free_unwrap_CK_ATTRIBUTE(pLocal, (int) usCount);
	}
	free(pTemplate);
	pTemplate = NULL;
	free(phNewObject);
	phNewObject = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	hObject = in->hObject;
	if (in->pTemplate.pTemplate_len == 0) {
		pTemplate = NULL;
	}
	else {
		pTemplate = malloc(sizeof(CK_ATTRIBUTE) * in->pTemplate.pTemplate_len);
		CK_ATTRIBUTE *pLocal = pTemplate;
		REMOTE_CK_ATTRIBUTE *pRemote = in->pTemplate.pTemplate_val;
		unwrap_CK_ATTRIBUTE(pLocal, pRemote, &(in->usCount));
	}
	usCount = in->usCount;
	if (in->phNewObject == NULL) {
		phNewObject = NULL;
	}
	else {
		phNewObject = malloc(sizeof(CK_OBJECT_HANDLE));
		memcpy(phNewObject, in->phNewObject, sizeof(CK_OBJECT_HANDLE));
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_CopyObject(hSession,hObject,pTemplate,usCount,phNewObject);
	// Free Wrapping
	if (out.pTemplate.pTemplate_val != NULL) {
		REMOTE_CK_ATTRIBUTE *pRemote = out.pTemplate.pTemplate_val;
		free_wrap_CK_ATTRIBUTE(pRemote, (int) out.pTemplate.pTemplate_len);
	}
	free(out.pTemplate.pTemplate_val);
	out.pTemplate.pTemplate_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	out.hObject = hObject;
	if (pTemplate == NULL) {
		out.pTemplate.pTemplate_val = NULL;
		out.pTemplate.pTemplate_len = 0;
	}
	else {
		out.pTemplate.pTemplate_val = malloc(sizeof(REMOTE_CK_ATTRIBUTE) * usCount);
		CK_ATTRIBUTE *pLocal = pTemplate;
		REMOTE_CK_ATTRIBUTE *pRemote = out.pTemplate.pTemplate_val;
		wrap_CK_ATTRIBUTE(pLocal, pRemote, &usCount);
	}
	out.usCount = usCount;
	out.phNewObject = phNewObject;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_DestroyObject_Param * r_ck_c_destroyobject_1(R_CK_C_DestroyObject_Param *param, CLIENT *cl) {
}
R_CK_C_DestroyObject_Param * r_ck_c_destroyobject_1_svc(R_CK_C_DestroyObject_Param *in, struct svc_req *req) {
	printf("CK_C_DestroyObject\n");
	fflush(stdin);
	static R_CK_C_DestroyObject_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_OBJECT_HANDLE hObject;
	// Free Unwrapping
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	hObject = in->hObject;
	// End Unwrapping
	//Remote calling
	CK_RV res = C_DestroyObject(hSession,hObject);
	// Free Wrapping
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	out.hObject = hObject;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_GetObjectSize_Param * r_ck_c_getobjectsize_1(R_CK_C_GetObjectSize_Param *param, CLIENT *cl) {
}
R_CK_C_GetObjectSize_Param * r_ck_c_getobjectsize_1_svc(R_CK_C_GetObjectSize_Param *in, struct svc_req *req) {
	printf("CK_C_GetObjectSize\n");
	fflush(stdin);
	static R_CK_C_GetObjectSize_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_OBJECT_HANDLE hObject;
	static CK_ULONG_PTR pusSize;
	// Free Unwrapping
	free(pusSize);
	pusSize = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	hObject = in->hObject;
	if (in->pusSize == NULL) {
		pusSize = NULL;
	}
	else {
		pusSize = malloc(sizeof(CK_ULONG));
		memcpy(pusSize, in->pusSize, sizeof(CK_ULONG));
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_GetObjectSize(hSession,hObject,pusSize);
	// Free Wrapping
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	out.hObject = hObject;
	out.pusSize = pusSize;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_GetAttributeValue_Param * r_ck_c_getattributevalue_1(R_CK_C_GetAttributeValue_Param *param, CLIENT *cl) {
}
R_CK_C_GetAttributeValue_Param * r_ck_c_getattributevalue_1_svc(R_CK_C_GetAttributeValue_Param *in, struct svc_req *req) {
	printf("CK_C_GetAttributeValue\n");
	fflush(stdin);
	static R_CK_C_GetAttributeValue_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_OBJECT_HANDLE hObject;
	static CK_ATTRIBUTE_PTR pTemplate;
	static CK_ULONG usCount;
	// Free Unwrapping
	if (pTemplate != NULL) {
		CK_ATTRIBUTE *pLocal = pTemplate;
		free_unwrap_CK_ATTRIBUTE(pLocal, (int) usCount);
	}
	free(pTemplate);
	pTemplate = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	hObject = in->hObject;
	if (in->pTemplate.pTemplate_len == 0) {
		pTemplate = NULL;
	}
	else {
		pTemplate = malloc(sizeof(CK_ATTRIBUTE) * in->pTemplate.pTemplate_len);
		CK_ATTRIBUTE *pLocal = pTemplate;
		REMOTE_CK_ATTRIBUTE *pRemote = in->pTemplate.pTemplate_val;
		unwrap_CK_ATTRIBUTE(pLocal, pRemote, &(in->usCount));
	}
	usCount = in->usCount;
	// End Unwrapping
	//Remote calling
	CK_RV res = C_GetAttributeValue(hSession,hObject,pTemplate,usCount);
	// Free Wrapping
	if (out.pTemplate.pTemplate_val != NULL) {
		REMOTE_CK_ATTRIBUTE *pRemote = out.pTemplate.pTemplate_val;
		free_wrap_CK_ATTRIBUTE(pRemote, (int) out.pTemplate.pTemplate_len);
	}
	free(out.pTemplate.pTemplate_val);
	out.pTemplate.pTemplate_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	out.hObject = hObject;
	if (pTemplate == NULL) {
		out.pTemplate.pTemplate_val = NULL;
		out.pTemplate.pTemplate_len = 0;
	}
	else {
		out.pTemplate.pTemplate_val = malloc(sizeof(REMOTE_CK_ATTRIBUTE) * usCount);
		CK_ATTRIBUTE *pLocal = pTemplate;
		REMOTE_CK_ATTRIBUTE *pRemote = out.pTemplate.pTemplate_val;
		wrap_CK_ATTRIBUTE(pLocal, pRemote, &usCount);
	}
	out.usCount = usCount;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_SetAttributeValue_Param * r_ck_c_setattributevalue_1(R_CK_C_SetAttributeValue_Param *param, CLIENT *cl) {
}
R_CK_C_SetAttributeValue_Param * r_ck_c_setattributevalue_1_svc(R_CK_C_SetAttributeValue_Param *in, struct svc_req *req) {
	printf("CK_C_SetAttributeValue\n");
	fflush(stdin);
	static R_CK_C_SetAttributeValue_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_OBJECT_HANDLE hObject;
	static CK_ATTRIBUTE_PTR pTemplate;
	static CK_ULONG usCount;
	// Free Unwrapping
	if (pTemplate != NULL) {
		CK_ATTRIBUTE *pLocal = pTemplate;
		free_unwrap_CK_ATTRIBUTE(pLocal, (int) usCount);
	}
	free(pTemplate);
	pTemplate = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	hObject = in->hObject;
	if (in->pTemplate.pTemplate_len == 0) {
		pTemplate = NULL;
	}
	else {
		pTemplate = malloc(sizeof(CK_ATTRIBUTE) * in->pTemplate.pTemplate_len);
		CK_ATTRIBUTE *pLocal = pTemplate;
		REMOTE_CK_ATTRIBUTE *pRemote = in->pTemplate.pTemplate_val;
		unwrap_CK_ATTRIBUTE(pLocal, pRemote, &(in->usCount));
	}
	usCount = in->usCount;
	// End Unwrapping
	//Remote calling
	CK_RV res = C_SetAttributeValue(hSession,hObject,pTemplate,usCount);
	// Free Wrapping
	if (out.pTemplate.pTemplate_val != NULL) {
		REMOTE_CK_ATTRIBUTE *pRemote = out.pTemplate.pTemplate_val;
		free_wrap_CK_ATTRIBUTE(pRemote, (int) out.pTemplate.pTemplate_len);
	}
	free(out.pTemplate.pTemplate_val);
	out.pTemplate.pTemplate_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	out.hObject = hObject;
	if (pTemplate == NULL) {
		out.pTemplate.pTemplate_val = NULL;
		out.pTemplate.pTemplate_len = 0;
	}
	else {
		out.pTemplate.pTemplate_val = malloc(sizeof(REMOTE_CK_ATTRIBUTE) * usCount);
		CK_ATTRIBUTE *pLocal = pTemplate;
		REMOTE_CK_ATTRIBUTE *pRemote = out.pTemplate.pTemplate_val;
		wrap_CK_ATTRIBUTE(pLocal, pRemote, &usCount);
	}
	out.usCount = usCount;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_FindObjectsInit_Param * r_ck_c_findobjectsinit_1(R_CK_C_FindObjectsInit_Param *param, CLIENT *cl) {
}
R_CK_C_FindObjectsInit_Param * r_ck_c_findobjectsinit_1_svc(R_CK_C_FindObjectsInit_Param *in, struct svc_req *req) {
	printf("CK_C_FindObjectsInit\n");
	fflush(stdin);
	static R_CK_C_FindObjectsInit_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_ATTRIBUTE_PTR pTemplate;
	static CK_ULONG usCount;
	// Free Unwrapping
	if (pTemplate != NULL) {
		CK_ATTRIBUTE *pLocal = pTemplate;
		free_unwrap_CK_ATTRIBUTE(pLocal, (int) usCount);
	}
	free(pTemplate);
	pTemplate = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pTemplate.pTemplate_len == 0) {
		pTemplate = NULL;
	}
	else {
		pTemplate = malloc(sizeof(CK_ATTRIBUTE) * in->pTemplate.pTemplate_len);
		CK_ATTRIBUTE *pLocal = pTemplate;
		REMOTE_CK_ATTRIBUTE *pRemote = in->pTemplate.pTemplate_val;
		unwrap_CK_ATTRIBUTE(pLocal, pRemote, &(in->usCount));
	}
	usCount = in->usCount;
	// End Unwrapping
	//Remote calling
	CK_RV res = C_FindObjectsInit(hSession,pTemplate,usCount);
	// Free Wrapping
	if (out.pTemplate.pTemplate_val != NULL) {
		REMOTE_CK_ATTRIBUTE *pRemote = out.pTemplate.pTemplate_val;
		free_wrap_CK_ATTRIBUTE(pRemote, (int) out.pTemplate.pTemplate_len);
	}
	free(out.pTemplate.pTemplate_val);
	out.pTemplate.pTemplate_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pTemplate == NULL) {
		out.pTemplate.pTemplate_val = NULL;
		out.pTemplate.pTemplate_len = 0;
	}
	else {
		out.pTemplate.pTemplate_val = malloc(sizeof(REMOTE_CK_ATTRIBUTE) * usCount);
		CK_ATTRIBUTE *pLocal = pTemplate;
		REMOTE_CK_ATTRIBUTE *pRemote = out.pTemplate.pTemplate_val;
		wrap_CK_ATTRIBUTE(pLocal, pRemote, &usCount);
	}
	out.usCount = usCount;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_FindObjects_Param * r_ck_c_findobjects_1(R_CK_C_FindObjects_Param *param, CLIENT *cl) {
}
R_CK_C_FindObjects_Param * r_ck_c_findobjects_1_svc(R_CK_C_FindObjects_Param *in, struct svc_req *req) {
	printf("CK_C_FindObjects\n");
	fflush(stdin);
	static R_CK_C_FindObjects_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_OBJECT_HANDLE_PTR phObject;
	static CK_ULONG usMaxObjectCount;
	static CK_ULONG_PTR pusObjectCount;
	// Free Unwrapping
	free(phObject);
	phObject = NULL;
	free(pusObjectCount);
	pusObjectCount = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->phObject.phObject_len == 0) {
		phObject = NULL;
	}
	else {
		phObject = malloc(sizeof(CK_OBJECT_HANDLE) * in->phObject.phObject_len);
		memcpy(phObject, in->phObject.phObject_val, sizeof(CK_OBJECT_HANDLE) * in->phObject.phObject_len);
	}
	usMaxObjectCount = in->usMaxObjectCount;
	if (in->pusObjectCount == NULL) {
		pusObjectCount = NULL;
	}
	else {
		pusObjectCount = malloc(sizeof(CK_ULONG));
		memcpy(pusObjectCount, in->pusObjectCount, sizeof(CK_ULONG));
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_FindObjects(hSession,phObject,usMaxObjectCount,pusObjectCount);
	// Free Wrapping
	free(out.phObject.phObject_val);
	out.phObject.phObject_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (phObject == NULL) {
		out.phObject.phObject_val = NULL;
		out.phObject.phObject_len = 0;
	}
	else {
		out.phObject.phObject_val = malloc(sizeof(REMOTE_CK_OBJECT_HANDLE) * usMaxObjectCount);
		memcpy(out.phObject.phObject_val, phObject, sizeof(CK_OBJECT_HANDLE) * usMaxObjectCount);
	}
	out.usMaxObjectCount = usMaxObjectCount;
	out.pusObjectCount = pusObjectCount;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_FindObjectsFinal_Param * r_ck_c_findobjectsfinal_1(R_CK_C_FindObjectsFinal_Param *param, CLIENT *cl) {
}
R_CK_C_FindObjectsFinal_Param * r_ck_c_findobjectsfinal_1_svc(R_CK_C_FindObjectsFinal_Param *in, struct svc_req *req) {
	printf("CK_C_FindObjectsFinal\n");
	fflush(stdin);
	static R_CK_C_FindObjectsFinal_Param out;
	static CK_SESSION_HANDLE hSession;
	// Free Unwrapping
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	// End Unwrapping
	//Remote calling
	CK_RV res = C_FindObjectsFinal(hSession);
	// Free Wrapping
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_EncryptInit_Param * r_ck_c_encryptinit_1(R_CK_C_EncryptInit_Param *param, CLIENT *cl) {
}
R_CK_C_EncryptInit_Param * r_ck_c_encryptinit_1_svc(R_CK_C_EncryptInit_Param *in, struct svc_req *req) {
	printf("CK_C_EncryptInit\n");
	fflush(stdin);
	static R_CK_C_EncryptInit_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_MECHANISM_PTR pMechanism;
	static CK_OBJECT_HANDLE hKey;
	// Free Unwrapping
	free(pMechanism->pParameter);
	pMechanism->pParameter = NULL;
	free(pMechanism);
	pMechanism = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pMechanism == NULL) {
		pMechanism = NULL;
	}
	else {
		pMechanism = malloc(sizeof(CK_MECHANISM));
		pMechanism->mechanism = in->pMechanism->mechanism;
		if (in->pMechanism->pParameter.pParameter_len == 0) {
			pMechanism->pParameter = NULL;
		}
		else {
			pMechanism->pParameter = malloc(sizeof(CK_BYTE) * in->pMechanism->pParameter.pParameter_len);
			memcpy(pMechanism->pParameter, in->pMechanism->pParameter.pParameter_val, sizeof(CK_BYTE) * in->pMechanism->pParameter.pParameter_len);
		}
		pMechanism->ulParameterLen = in->pMechanism->ulParameterLen;
	}
	hKey = in->hKey;
	// End Unwrapping
	//Remote calling
	CK_RV res = C_EncryptInit(hSession,pMechanism,hKey);
	// Free Wrapping
	free(out.pMechanism->pParameter.pParameter_val);
	out.pMechanism->pParameter.pParameter_val = NULL;
	free(out.pMechanism);
	out.pMechanism = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pMechanism == NULL) {
		out.pMechanism = NULL;
	}
	else {
		out.pMechanism = malloc(sizeof(REMOTE_CK_MECHANISM));
		out.pMechanism->mechanism = pMechanism->mechanism;
		if (pMechanism->pParameter == NULL) {
			out.pMechanism->pParameter.pParameter_val = NULL;
			out.pMechanism->pParameter.pParameter_len = 0;
		}
		else {
			out.pMechanism->pParameter.pParameter_val = malloc(sizeof(REMOTE_CK_VOID_PTR) * pMechanism->ulParameterLen);
			memcpy(out.pMechanism->pParameter.pParameter_val, pMechanism->pParameter, sizeof(CK_VOID_PTR) * pMechanism->ulParameterLen);
		}
		out.pMechanism->ulParameterLen = pMechanism->ulParameterLen;
	}
	out.hKey = hKey;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_Encrypt_Param * r_ck_c_encrypt_1(R_CK_C_Encrypt_Param *param, CLIENT *cl) {
}
R_CK_C_Encrypt_Param * r_ck_c_encrypt_1_svc(R_CK_C_Encrypt_Param *in, struct svc_req *req) {
	printf("CK_C_Encrypt\n");
	fflush(stdin);
	static R_CK_C_Encrypt_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_BYTE_PTR pData;
	static CK_ULONG usDataLen;
	static CK_BYTE_PTR pEncryptedData;
	static CK_ULONG_PTR pusEncryptedDataLen;
	// Free Unwrapping
	free(pData);
	pData = NULL;
	free(pEncryptedData);
	pEncryptedData = NULL;
	free(pusEncryptedDataLen);
	pusEncryptedDataLen = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pData.pData_len == 0) {
		pData = NULL;
	}
	else {
		pData = malloc(sizeof(CK_BYTE) * in->pData.pData_len);
		memcpy(pData, in->pData.pData_val, sizeof(CK_BYTE) * in->pData.pData_len);
	}
	usDataLen = in->usDataLen;
	if (in->pEncryptedData.pEncryptedData_len == 0) {
		pEncryptedData = NULL;
	}
	else {
		pEncryptedData = malloc(sizeof(CK_BYTE) * in->pEncryptedData.pEncryptedData_len);
		memcpy(pEncryptedData, in->pEncryptedData.pEncryptedData_val, sizeof(CK_BYTE) * in->pEncryptedData.pEncryptedData_len);
	}
	if (in->pusEncryptedDataLen == NULL) {
		pusEncryptedDataLen = NULL;
	}
	else {
		pusEncryptedDataLen = malloc(sizeof(CK_ULONG));
		memcpy(pusEncryptedDataLen, in->pusEncryptedDataLen, sizeof(CK_ULONG));
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_Encrypt(hSession,pData,usDataLen,pEncryptedData,pusEncryptedDataLen);
	// Free Wrapping
	free(out.pData.pData_val);
	out.pData.pData_val = NULL;
	free(out.pEncryptedData.pEncryptedData_val);
	out.pEncryptedData.pEncryptedData_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pData == NULL) {
		out.pData.pData_val = NULL;
		out.pData.pData_len = 0;
	}
	else {
		out.pData.pData_val = malloc(sizeof(REMOTE_CK_BYTE) * usDataLen);
		memcpy(out.pData.pData_val, pData, sizeof(CK_BYTE) * usDataLen);
	}
	out.usDataLen = usDataLen;
	if (pEncryptedData == NULL) {
		out.pEncryptedData.pEncryptedData_val = NULL;
		out.pEncryptedData.pEncryptedData_len = 0;
	}
	else {
		out.pEncryptedData.pEncryptedData_val = malloc(sizeof(REMOTE_CK_BYTE) * (*pusEncryptedDataLen));
		memcpy(out.pEncryptedData.pEncryptedData_val, pEncryptedData, sizeof(CK_BYTE) * (*pusEncryptedDataLen));
	}
	out.pusEncryptedDataLen = pusEncryptedDataLen;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_EncryptUpdate_Param * r_ck_c_encryptupdate_1(R_CK_C_EncryptUpdate_Param *param, CLIENT *cl) {
}
R_CK_C_EncryptUpdate_Param * r_ck_c_encryptupdate_1_svc(R_CK_C_EncryptUpdate_Param *in, struct svc_req *req) {
	printf("CK_C_EncryptUpdate\n");
	fflush(stdin);
	static R_CK_C_EncryptUpdate_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_BYTE_PTR pPart;
	static CK_ULONG usPartLen;
	static CK_BYTE_PTR pEncryptedPart;
	static CK_ULONG_PTR pusEncryptedPartLen;
	// Free Unwrapping
	free(pPart);
	pPart = NULL;
	free(pEncryptedPart);
	pEncryptedPart = NULL;
	free(pusEncryptedPartLen);
	pusEncryptedPartLen = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pPart.pPart_len == 0) {
		pPart = NULL;
	}
	else {
		pPart = malloc(sizeof(CK_BYTE) * in->pPart.pPart_len);
		memcpy(pPart, in->pPart.pPart_val, sizeof(CK_BYTE) * in->pPart.pPart_len);
	}
	usPartLen = in->usPartLen;
	if (in->pEncryptedPart.pEncryptedPart_len == 0) {
		pEncryptedPart = NULL;
	}
	else {
		pEncryptedPart = malloc(sizeof(CK_BYTE) * in->pEncryptedPart.pEncryptedPart_len);
		memcpy(pEncryptedPart, in->pEncryptedPart.pEncryptedPart_val, sizeof(CK_BYTE) * in->pEncryptedPart.pEncryptedPart_len);
	}
	if (in->pusEncryptedPartLen == NULL) {
		pusEncryptedPartLen = NULL;
	}
	else {
		pusEncryptedPartLen = malloc(sizeof(CK_ULONG));
		memcpy(pusEncryptedPartLen, in->pusEncryptedPartLen, sizeof(CK_ULONG));
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_EncryptUpdate(hSession,pPart,usPartLen,pEncryptedPart,pusEncryptedPartLen);
	// Free Wrapping
	free(out.pPart.pPart_val);
	out.pPart.pPart_val = NULL;
	free(out.pEncryptedPart.pEncryptedPart_val);
	out.pEncryptedPart.pEncryptedPart_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pPart == NULL) {
		out.pPart.pPart_val = NULL;
		out.pPart.pPart_len = 0;
	}
	else {
		out.pPart.pPart_val = malloc(sizeof(REMOTE_CK_BYTE) * usPartLen);
		memcpy(out.pPart.pPart_val, pPart, sizeof(CK_BYTE) * usPartLen);
	}
	out.usPartLen = usPartLen;
	if (pEncryptedPart == NULL) {
		out.pEncryptedPart.pEncryptedPart_val = NULL;
		out.pEncryptedPart.pEncryptedPart_len = 0;
	}
	else {
		out.pEncryptedPart.pEncryptedPart_val = malloc(sizeof(REMOTE_CK_BYTE) * (*pusEncryptedPartLen));
		memcpy(out.pEncryptedPart.pEncryptedPart_val, pEncryptedPart, sizeof(CK_BYTE) * (*pusEncryptedPartLen));
	}
	out.pusEncryptedPartLen = pusEncryptedPartLen;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_EncryptFinal_Param * r_ck_c_encryptfinal_1(R_CK_C_EncryptFinal_Param *param, CLIENT *cl) {
}
R_CK_C_EncryptFinal_Param * r_ck_c_encryptfinal_1_svc(R_CK_C_EncryptFinal_Param *in, struct svc_req *req) {
	printf("CK_C_EncryptFinal\n");
	fflush(stdin);
	static R_CK_C_EncryptFinal_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_BYTE_PTR pLastEncryptedPart;
	static CK_ULONG_PTR pusLastEncryptedPartLen;
	// Free Unwrapping
	free(pLastEncryptedPart);
	pLastEncryptedPart = NULL;
	free(pusLastEncryptedPartLen);
	pusLastEncryptedPartLen = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pLastEncryptedPart.pLastEncryptedPart_len == 0) {
		pLastEncryptedPart = NULL;
	}
	else {
		pLastEncryptedPart = malloc(sizeof(CK_BYTE) * in->pLastEncryptedPart.pLastEncryptedPart_len);
		memcpy(pLastEncryptedPart, in->pLastEncryptedPart.pLastEncryptedPart_val, sizeof(CK_BYTE) * in->pLastEncryptedPart.pLastEncryptedPart_len);
	}
	if (in->pusLastEncryptedPartLen == NULL) {
		pusLastEncryptedPartLen = NULL;
	}
	else {
		pusLastEncryptedPartLen = malloc(sizeof(CK_ULONG));
		memcpy(pusLastEncryptedPartLen, in->pusLastEncryptedPartLen, sizeof(CK_ULONG));
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_EncryptFinal(hSession,pLastEncryptedPart,pusLastEncryptedPartLen);
	// Free Wrapping
	free(out.pLastEncryptedPart.pLastEncryptedPart_val);
	out.pLastEncryptedPart.pLastEncryptedPart_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pLastEncryptedPart == NULL) {
		out.pLastEncryptedPart.pLastEncryptedPart_val = NULL;
		out.pLastEncryptedPart.pLastEncryptedPart_len = 0;
	}
	else {
		out.pLastEncryptedPart.pLastEncryptedPart_val = malloc(sizeof(REMOTE_CK_BYTE) * (*pusLastEncryptedPartLen));
		memcpy(out.pLastEncryptedPart.pLastEncryptedPart_val, pLastEncryptedPart, sizeof(CK_BYTE) * (*pusLastEncryptedPartLen));
	}
	out.pusLastEncryptedPartLen = pusLastEncryptedPartLen;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_DecryptInit_Param * r_ck_c_decryptinit_1(R_CK_C_DecryptInit_Param *param, CLIENT *cl) {
}
R_CK_C_DecryptInit_Param * r_ck_c_decryptinit_1_svc(R_CK_C_DecryptInit_Param *in, struct svc_req *req) {
	printf("CK_C_DecryptInit\n");
	fflush(stdin);
	static R_CK_C_DecryptInit_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_MECHANISM_PTR pMechanism;
	static CK_OBJECT_HANDLE hKey;
	// Free Unwrapping
	free(pMechanism->pParameter);
	pMechanism->pParameter = NULL;
	free(pMechanism);
	pMechanism = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pMechanism == NULL) {
		pMechanism = NULL;
	}
	else {
		pMechanism = malloc(sizeof(CK_MECHANISM));
		pMechanism->mechanism = in->pMechanism->mechanism;
		if (in->pMechanism->pParameter.pParameter_len == 0) {
			pMechanism->pParameter = NULL;
		}
		else {
			pMechanism->pParameter = malloc(sizeof(CK_BYTE) * in->pMechanism->pParameter.pParameter_len);
			memcpy(pMechanism->pParameter, in->pMechanism->pParameter.pParameter_val, sizeof(CK_BYTE) * in->pMechanism->pParameter.pParameter_len);
		}
		pMechanism->ulParameterLen = in->pMechanism->ulParameterLen;
	}
	hKey = in->hKey;
	// End Unwrapping
	//Remote calling
	CK_RV res = C_DecryptInit(hSession,pMechanism,hKey);
	// Free Wrapping
	free(out.pMechanism->pParameter.pParameter_val);
	out.pMechanism->pParameter.pParameter_val = NULL;
	free(out.pMechanism);
	out.pMechanism = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pMechanism == NULL) {
		out.pMechanism = NULL;
	}
	else {
		out.pMechanism = malloc(sizeof(REMOTE_CK_MECHANISM));
		out.pMechanism->mechanism = pMechanism->mechanism;
		if (pMechanism->pParameter == NULL) {
			out.pMechanism->pParameter.pParameter_val = NULL;
			out.pMechanism->pParameter.pParameter_len = 0;
		}
		else {
			out.pMechanism->pParameter.pParameter_val = malloc(sizeof(REMOTE_CK_VOID_PTR) * pMechanism->ulParameterLen);
			memcpy(out.pMechanism->pParameter.pParameter_val, pMechanism->pParameter, sizeof(CK_VOID_PTR) * pMechanism->ulParameterLen);
		}
		out.pMechanism->ulParameterLen = pMechanism->ulParameterLen;
	}
	out.hKey = hKey;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_Decrypt_Param * r_ck_c_decrypt_1(R_CK_C_Decrypt_Param *param, CLIENT *cl) {
}
R_CK_C_Decrypt_Param * r_ck_c_decrypt_1_svc(R_CK_C_Decrypt_Param *in, struct svc_req *req) {
	printf("CK_C_Decrypt\n");
	fflush(stdin);
	static R_CK_C_Decrypt_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_BYTE_PTR pEncryptedData;
	static CK_ULONG usEncryptedDataLen;
	static CK_BYTE_PTR pData;
	static CK_ULONG_PTR pusDataLen;
	// Free Unwrapping
	free(pEncryptedData);
	pEncryptedData = NULL;
	free(pData);
	pData = NULL;
	free(pusDataLen);
	pusDataLen = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pEncryptedData.pEncryptedData_len == 0) {
		pEncryptedData = NULL;
	}
	else {
		pEncryptedData = malloc(sizeof(CK_BYTE) * in->pEncryptedData.pEncryptedData_len);
		memcpy(pEncryptedData, in->pEncryptedData.pEncryptedData_val, sizeof(CK_BYTE) * in->pEncryptedData.pEncryptedData_len);
	}
	usEncryptedDataLen = in->usEncryptedDataLen;
	if (in->pData.pData_len == 0) {
		pData = NULL;
	}
	else {
		pData = malloc(sizeof(CK_BYTE) * in->pData.pData_len);
		memcpy(pData, in->pData.pData_val, sizeof(CK_BYTE) * in->pData.pData_len);
	}
	if (in->pusDataLen == NULL) {
		pusDataLen = NULL;
	}
	else {
		pusDataLen = malloc(sizeof(CK_ULONG));
		memcpy(pusDataLen, in->pusDataLen, sizeof(CK_ULONG));
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_Decrypt(hSession,pEncryptedData,usEncryptedDataLen,pData,pusDataLen);
	// Free Wrapping
	free(out.pEncryptedData.pEncryptedData_val);
	out.pEncryptedData.pEncryptedData_val = NULL;
	free(out.pData.pData_val);
	out.pData.pData_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pEncryptedData == NULL) {
		out.pEncryptedData.pEncryptedData_val = NULL;
		out.pEncryptedData.pEncryptedData_len = 0;
	}
	else {
		out.pEncryptedData.pEncryptedData_val = malloc(sizeof(REMOTE_CK_BYTE) * usEncryptedDataLen);
		memcpy(out.pEncryptedData.pEncryptedData_val, pEncryptedData, sizeof(CK_BYTE) * usEncryptedDataLen);
	}
	out.usEncryptedDataLen = usEncryptedDataLen;
	if (pData == NULL) {
		out.pData.pData_val = NULL;
		out.pData.pData_len = 0;
	}
	else {
		out.pData.pData_val = malloc(sizeof(REMOTE_CK_BYTE) * (*pusDataLen));
		memcpy(out.pData.pData_val, pData, sizeof(CK_BYTE) * (*pusDataLen));
	}
	out.pusDataLen = pusDataLen;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_DecryptUpdate_Param * r_ck_c_decryptupdate_1(R_CK_C_DecryptUpdate_Param *param, CLIENT *cl) {
}
R_CK_C_DecryptUpdate_Param * r_ck_c_decryptupdate_1_svc(R_CK_C_DecryptUpdate_Param *in, struct svc_req *req) {
	printf("CK_C_DecryptUpdate\n");
	fflush(stdin);
	static R_CK_C_DecryptUpdate_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_BYTE_PTR pEncryptedPart;
	static CK_ULONG usEncryptedPartLen;
	static CK_BYTE_PTR pPart;
	static CK_ULONG_PTR pusPartLen;
	// Free Unwrapping
	free(pEncryptedPart);
	pEncryptedPart = NULL;
	free(pPart);
	pPart = NULL;
	free(pusPartLen);
	pusPartLen = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pEncryptedPart.pEncryptedPart_len == 0) {
		pEncryptedPart = NULL;
	}
	else {
		pEncryptedPart = malloc(sizeof(CK_BYTE) * in->pEncryptedPart.pEncryptedPart_len);
		memcpy(pEncryptedPart, in->pEncryptedPart.pEncryptedPart_val, sizeof(CK_BYTE) * in->pEncryptedPart.pEncryptedPart_len);
	}
	usEncryptedPartLen = in->usEncryptedPartLen;
	if (in->pPart.pPart_len == 0) {
		pPart = NULL;
	}
	else {
		pPart = malloc(sizeof(CK_BYTE) * in->pPart.pPart_len);
		memcpy(pPart, in->pPart.pPart_val, sizeof(CK_BYTE) * in->pPart.pPart_len);
	}
	if (in->pusPartLen == NULL) {
		pusPartLen = NULL;
	}
	else {
		pusPartLen = malloc(sizeof(CK_ULONG));
		memcpy(pusPartLen, in->pusPartLen, sizeof(CK_ULONG));
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_DecryptUpdate(hSession,pEncryptedPart,usEncryptedPartLen,pPart,pusPartLen);
	// Free Wrapping
	free(out.pEncryptedPart.pEncryptedPart_val);
	out.pEncryptedPart.pEncryptedPart_val = NULL;
	free(out.pPart.pPart_val);
	out.pPart.pPart_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pEncryptedPart == NULL) {
		out.pEncryptedPart.pEncryptedPart_val = NULL;
		out.pEncryptedPart.pEncryptedPart_len = 0;
	}
	else {
		out.pEncryptedPart.pEncryptedPart_val = malloc(sizeof(REMOTE_CK_BYTE) * usEncryptedPartLen);
		memcpy(out.pEncryptedPart.pEncryptedPart_val, pEncryptedPart, sizeof(CK_BYTE) * usEncryptedPartLen);
	}
	out.usEncryptedPartLen = usEncryptedPartLen;
	if (pPart == NULL) {
		out.pPart.pPart_val = NULL;
		out.pPart.pPart_len = 0;
	}
	else {
		out.pPart.pPart_val = malloc(sizeof(REMOTE_CK_BYTE) * (*pusPartLen));
		memcpy(out.pPart.pPart_val, pPart, sizeof(CK_BYTE) * (*pusPartLen));
	}
	out.pusPartLen = pusPartLen;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_DecryptFinal_Param * r_ck_c_decryptfinal_1(R_CK_C_DecryptFinal_Param *param, CLIENT *cl) {
}
R_CK_C_DecryptFinal_Param * r_ck_c_decryptfinal_1_svc(R_CK_C_DecryptFinal_Param *in, struct svc_req *req) {
	printf("CK_C_DecryptFinal\n");
	fflush(stdin);
	static R_CK_C_DecryptFinal_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_BYTE_PTR pLastPart;
	static CK_ULONG_PTR pusLastPartLen;
	// Free Unwrapping
	free(pLastPart);
	pLastPart = NULL;
	free(pusLastPartLen);
	pusLastPartLen = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pLastPart.pLastPart_len == 0) {
		pLastPart = NULL;
	}
	else {
		pLastPart = malloc(sizeof(CK_BYTE) * in->pLastPart.pLastPart_len);
		memcpy(pLastPart, in->pLastPart.pLastPart_val, sizeof(CK_BYTE) * in->pLastPart.pLastPart_len);
	}
	if (in->pusLastPartLen == NULL) {
		pusLastPartLen = NULL;
	}
	else {
		pusLastPartLen = malloc(sizeof(CK_ULONG));
		memcpy(pusLastPartLen, in->pusLastPartLen, sizeof(CK_ULONG));
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_DecryptFinal(hSession,pLastPart,pusLastPartLen);
	// Free Wrapping
	free(out.pLastPart.pLastPart_val);
	out.pLastPart.pLastPart_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pLastPart == NULL) {
		out.pLastPart.pLastPart_val = NULL;
		out.pLastPart.pLastPart_len = 0;
	}
	else {
		out.pLastPart.pLastPart_val = malloc(sizeof(REMOTE_CK_BYTE) * (*pusLastPartLen));
		memcpy(out.pLastPart.pLastPart_val, pLastPart, sizeof(CK_BYTE) * (*pusLastPartLen));
	}
	out.pusLastPartLen = pusLastPartLen;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_DigestInit_Param * r_ck_c_digestinit_1(R_CK_C_DigestInit_Param *param, CLIENT *cl) {
}
R_CK_C_DigestInit_Param * r_ck_c_digestinit_1_svc(R_CK_C_DigestInit_Param *in, struct svc_req *req) {
	printf("CK_C_DigestInit\n");
	fflush(stdin);
	static R_CK_C_DigestInit_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_MECHANISM_PTR pMechanism;
	// Free Unwrapping
	free(pMechanism->pParameter);
	pMechanism->pParameter = NULL;
	free(pMechanism);
	pMechanism = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pMechanism == NULL) {
		pMechanism = NULL;
	}
	else {
		pMechanism = malloc(sizeof(CK_MECHANISM));
		pMechanism->mechanism = in->pMechanism->mechanism;
		if (in->pMechanism->pParameter.pParameter_len == 0) {
			pMechanism->pParameter = NULL;
		}
		else {
			pMechanism->pParameter = malloc(sizeof(CK_BYTE) * in->pMechanism->pParameter.pParameter_len);
			memcpy(pMechanism->pParameter, in->pMechanism->pParameter.pParameter_val, sizeof(CK_BYTE) * in->pMechanism->pParameter.pParameter_len);
		}
		pMechanism->ulParameterLen = in->pMechanism->ulParameterLen;
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_DigestInit(hSession,pMechanism);
	// Free Wrapping
	free(out.pMechanism->pParameter.pParameter_val);
	out.pMechanism->pParameter.pParameter_val = NULL;
	free(out.pMechanism);
	out.pMechanism = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pMechanism == NULL) {
		out.pMechanism = NULL;
	}
	else {
		out.pMechanism = malloc(sizeof(REMOTE_CK_MECHANISM));
		out.pMechanism->mechanism = pMechanism->mechanism;
		if (pMechanism->pParameter == NULL) {
			out.pMechanism->pParameter.pParameter_val = NULL;
			out.pMechanism->pParameter.pParameter_len = 0;
		}
		else {
			out.pMechanism->pParameter.pParameter_val = malloc(sizeof(REMOTE_CK_VOID_PTR) * pMechanism->ulParameterLen);
			memcpy(out.pMechanism->pParameter.pParameter_val, pMechanism->pParameter, sizeof(CK_VOID_PTR) * pMechanism->ulParameterLen);
		}
		out.pMechanism->ulParameterLen = pMechanism->ulParameterLen;
	}
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_Digest_Param * r_ck_c_digest_1(R_CK_C_Digest_Param *param, CLIENT *cl) {
}
R_CK_C_Digest_Param * r_ck_c_digest_1_svc(R_CK_C_Digest_Param *in, struct svc_req *req) {
	printf("CK_C_Digest\n");
	fflush(stdin);
	static R_CK_C_Digest_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_BYTE_PTR pData;
	static CK_ULONG usDataLen;
	static CK_BYTE_PTR pDigest;
	static CK_ULONG_PTR pusDigestLen;
	// Free Unwrapping
	free(pData);
	pData = NULL;
	free(pDigest);
	pDigest = NULL;
	free(pusDigestLen);
	pusDigestLen = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pData.pData_len == 0) {
		pData = NULL;
	}
	else {
		pData = malloc(sizeof(CK_BYTE) * in->pData.pData_len);
		memcpy(pData, in->pData.pData_val, sizeof(CK_BYTE) * in->pData.pData_len);
	}
	usDataLen = in->usDataLen;
	if (in->pDigest.pDigest_len == 0) {
		pDigest = NULL;
	}
	else {
		pDigest = malloc(sizeof(CK_BYTE) * in->pDigest.pDigest_len);
		memcpy(pDigest, in->pDigest.pDigest_val, sizeof(CK_BYTE) * in->pDigest.pDigest_len);
	}
	if (in->pusDigestLen == NULL) {
		pusDigestLen = NULL;
	}
	else {
		pusDigestLen = malloc(sizeof(CK_ULONG));
		memcpy(pusDigestLen, in->pusDigestLen, sizeof(CK_ULONG));
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_Digest(hSession,pData,usDataLen,pDigest,pusDigestLen);
	// Free Wrapping
	free(out.pData.pData_val);
	out.pData.pData_val = NULL;
	free(out.pDigest.pDigest_val);
	out.pDigest.pDigest_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pData == NULL) {
		out.pData.pData_val = NULL;
		out.pData.pData_len = 0;
	}
	else {
		out.pData.pData_val = malloc(sizeof(REMOTE_CK_BYTE) * usDataLen);
		memcpy(out.pData.pData_val, pData, sizeof(CK_BYTE) * usDataLen);
	}
	out.usDataLen = usDataLen;
	if (pDigest == NULL) {
		out.pDigest.pDigest_val = NULL;
		out.pDigest.pDigest_len = 0;
	}
	else {
		out.pDigest.pDigest_val = malloc(sizeof(REMOTE_CK_BYTE) * (*pusDigestLen));
		memcpy(out.pDigest.pDigest_val, pDigest, sizeof(CK_BYTE) * (*pusDigestLen));
	}
	out.pusDigestLen = pusDigestLen;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_DigestUpdate_Param * r_ck_c_digestupdate_1(R_CK_C_DigestUpdate_Param *param, CLIENT *cl) {
}
R_CK_C_DigestUpdate_Param * r_ck_c_digestupdate_1_svc(R_CK_C_DigestUpdate_Param *in, struct svc_req *req) {
	printf("CK_C_DigestUpdate\n");
	fflush(stdin);
	static R_CK_C_DigestUpdate_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_BYTE_PTR pPart;
	static CK_ULONG usPartLen;
	// Free Unwrapping
	free(pPart);
	pPart = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pPart.pPart_len == 0) {
		pPart = NULL;
	}
	else {
		pPart = malloc(sizeof(CK_BYTE) * in->pPart.pPart_len);
		memcpy(pPart, in->pPart.pPart_val, sizeof(CK_BYTE) * in->pPart.pPart_len);
	}
	usPartLen = in->usPartLen;
	// End Unwrapping
	//Remote calling
	CK_RV res = C_DigestUpdate(hSession,pPart,usPartLen);
	// Free Wrapping
	free(out.pPart.pPart_val);
	out.pPart.pPart_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pPart == NULL) {
		out.pPart.pPart_val = NULL;
		out.pPart.pPart_len = 0;
	}
	else {
		out.pPart.pPart_val = malloc(sizeof(REMOTE_CK_BYTE) * usPartLen);
		memcpy(out.pPart.pPart_val, pPart, sizeof(CK_BYTE) * usPartLen);
	}
	out.usPartLen = usPartLen;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_DigestKey_Param * r_ck_c_digestkey_1(R_CK_C_DigestKey_Param *param, CLIENT *cl) {
}
R_CK_C_DigestKey_Param * r_ck_c_digestkey_1_svc(R_CK_C_DigestKey_Param *in, struct svc_req *req) {
	printf("CK_C_DigestKey\n");
	fflush(stdin);
	static R_CK_C_DigestKey_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_OBJECT_HANDLE hKey;
	// Free Unwrapping
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	hKey = in->hKey;
	// End Unwrapping
	//Remote calling
	CK_RV res = C_DigestKey(hSession,hKey);
	// Free Wrapping
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	out.hKey = hKey;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_DigestFinal_Param * r_ck_c_digestfinal_1(R_CK_C_DigestFinal_Param *param, CLIENT *cl) {
}
R_CK_C_DigestFinal_Param * r_ck_c_digestfinal_1_svc(R_CK_C_DigestFinal_Param *in, struct svc_req *req) {
	printf("CK_C_DigestFinal\n");
	fflush(stdin);
	static R_CK_C_DigestFinal_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_BYTE_PTR pDigest;
	static CK_ULONG_PTR pusDigestLen;
	// Free Unwrapping
	free(pDigest);
	pDigest = NULL;
	free(pusDigestLen);
	pusDigestLen = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pDigest.pDigest_len == 0) {
		pDigest = NULL;
	}
	else {
		pDigest = malloc(sizeof(CK_BYTE) * in->pDigest.pDigest_len);
		memcpy(pDigest, in->pDigest.pDigest_val, sizeof(CK_BYTE) * in->pDigest.pDigest_len);
	}
	if (in->pusDigestLen == NULL) {
		pusDigestLen = NULL;
	}
	else {
		pusDigestLen = malloc(sizeof(CK_ULONG));
		memcpy(pusDigestLen, in->pusDigestLen, sizeof(CK_ULONG));
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_DigestFinal(hSession,pDigest,pusDigestLen);
	// Free Wrapping
	free(out.pDigest.pDigest_val);
	out.pDigest.pDigest_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pDigest == NULL) {
		out.pDigest.pDigest_val = NULL;
		out.pDigest.pDigest_len = 0;
	}
	else {
		out.pDigest.pDigest_val = malloc(sizeof(REMOTE_CK_BYTE) * (*pusDigestLen));
		memcpy(out.pDigest.pDigest_val, pDigest, sizeof(CK_BYTE) * (*pusDigestLen));
	}
	out.pusDigestLen = pusDigestLen;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_SignInit_Param * r_ck_c_signinit_1(R_CK_C_SignInit_Param *param, CLIENT *cl) {
}
R_CK_C_SignInit_Param * r_ck_c_signinit_1_svc(R_CK_C_SignInit_Param *in, struct svc_req *req) {
	printf("CK_C_SignInit\n");
	fflush(stdin);
	static R_CK_C_SignInit_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_MECHANISM_PTR pMechanism;
	static CK_OBJECT_HANDLE hKey;
	// Free Unwrapping
	free(pMechanism->pParameter);
	pMechanism->pParameter = NULL;
	free(pMechanism);
	pMechanism = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pMechanism == NULL) {
		pMechanism = NULL;
	}
	else {
		pMechanism = malloc(sizeof(CK_MECHANISM));
		pMechanism->mechanism = in->pMechanism->mechanism;
		if (in->pMechanism->pParameter.pParameter_len == 0) {
			pMechanism->pParameter = NULL;
		}
		else {
			pMechanism->pParameter = malloc(sizeof(CK_BYTE) * in->pMechanism->pParameter.pParameter_len);
			memcpy(pMechanism->pParameter, in->pMechanism->pParameter.pParameter_val, sizeof(CK_BYTE) * in->pMechanism->pParameter.pParameter_len);
		}
		pMechanism->ulParameterLen = in->pMechanism->ulParameterLen;
	}
	hKey = in->hKey;
	// End Unwrapping
	//Remote calling
	CK_RV res = C_SignInit(hSession,pMechanism,hKey);
	// Free Wrapping
	free(out.pMechanism->pParameter.pParameter_val);
	out.pMechanism->pParameter.pParameter_val = NULL;
	free(out.pMechanism);
	out.pMechanism = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pMechanism == NULL) {
		out.pMechanism = NULL;
	}
	else {
		out.pMechanism = malloc(sizeof(REMOTE_CK_MECHANISM));
		out.pMechanism->mechanism = pMechanism->mechanism;
		if (pMechanism->pParameter == NULL) {
			out.pMechanism->pParameter.pParameter_val = NULL;
			out.pMechanism->pParameter.pParameter_len = 0;
		}
		else {
			out.pMechanism->pParameter.pParameter_val = malloc(sizeof(REMOTE_CK_VOID_PTR) * pMechanism->ulParameterLen);
			memcpy(out.pMechanism->pParameter.pParameter_val, pMechanism->pParameter, sizeof(CK_VOID_PTR) * pMechanism->ulParameterLen);
		}
		out.pMechanism->ulParameterLen = pMechanism->ulParameterLen;
	}
	out.hKey = hKey;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_Sign_Param * r_ck_c_sign_1(R_CK_C_Sign_Param *param, CLIENT *cl) {
}
R_CK_C_Sign_Param * r_ck_c_sign_1_svc(R_CK_C_Sign_Param *in, struct svc_req *req) {
	printf("CK_C_Sign\n");
	fflush(stdin);
	static R_CK_C_Sign_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_BYTE_PTR pData;
	static CK_ULONG usDataLen;
	static CK_BYTE_PTR pSignature;
	static CK_ULONG_PTR pusSignatureLen;
	// Free Unwrapping
	free(pData);
	pData = NULL;
	free(pSignature);
	pSignature = NULL;
	free(pusSignatureLen);
	pusSignatureLen = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pData.pData_len == 0) {
		pData = NULL;
	}
	else {
		pData = malloc(sizeof(CK_BYTE) * in->pData.pData_len);
		memcpy(pData, in->pData.pData_val, sizeof(CK_BYTE) * in->pData.pData_len);
	}
	usDataLen = in->usDataLen;
	if (in->pSignature.pSignature_len == 0) {
		pSignature = NULL;
	}
	else {
		pSignature = malloc(sizeof(CK_BYTE) * in->pSignature.pSignature_len);
		memcpy(pSignature, in->pSignature.pSignature_val, sizeof(CK_BYTE) * in->pSignature.pSignature_len);
	}
	if (in->pusSignatureLen == NULL) {
		pusSignatureLen = NULL;
	}
	else {
		pusSignatureLen = malloc(sizeof(CK_ULONG));
		memcpy(pusSignatureLen, in->pusSignatureLen, sizeof(CK_ULONG));
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_Sign(hSession,pData,usDataLen,pSignature,pusSignatureLen);
	// Free Wrapping
	free(out.pData.pData_val);
	out.pData.pData_val = NULL;
	free(out.pSignature.pSignature_val);
	out.pSignature.pSignature_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pData == NULL) {
		out.pData.pData_val = NULL;
		out.pData.pData_len = 0;
	}
	else {
		out.pData.pData_val = malloc(sizeof(REMOTE_CK_BYTE) * usDataLen);
		memcpy(out.pData.pData_val, pData, sizeof(CK_BYTE) * usDataLen);
	}
	out.usDataLen = usDataLen;
	if (pSignature == NULL) {
		out.pSignature.pSignature_val = NULL;
		out.pSignature.pSignature_len = 0;
	}
	else {
		out.pSignature.pSignature_val = malloc(sizeof(REMOTE_CK_BYTE) * (*pusSignatureLen));
		memcpy(out.pSignature.pSignature_val, pSignature, sizeof(CK_BYTE) * (*pusSignatureLen));
	}
	out.pusSignatureLen = pusSignatureLen;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_SignUpdate_Param * r_ck_c_signupdate_1(R_CK_C_SignUpdate_Param *param, CLIENT *cl) {
}
R_CK_C_SignUpdate_Param * r_ck_c_signupdate_1_svc(R_CK_C_SignUpdate_Param *in, struct svc_req *req) {
	printf("CK_C_SignUpdate\n");
	fflush(stdin);
	static R_CK_C_SignUpdate_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_BYTE_PTR pPart;
	static CK_ULONG usPartLen;
	// Free Unwrapping
	free(pPart);
	pPart = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pPart.pPart_len == 0) {
		pPart = NULL;
	}
	else {
		pPart = malloc(sizeof(CK_BYTE) * in->pPart.pPart_len);
		memcpy(pPart, in->pPart.pPart_val, sizeof(CK_BYTE) * in->pPart.pPart_len);
	}
	usPartLen = in->usPartLen;
	// End Unwrapping
	//Remote calling
	CK_RV res = C_SignUpdate(hSession,pPart,usPartLen);
	// Free Wrapping
	free(out.pPart.pPart_val);
	out.pPart.pPart_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pPart == NULL) {
		out.pPart.pPart_val = NULL;
		out.pPart.pPart_len = 0;
	}
	else {
		out.pPart.pPart_val = malloc(sizeof(REMOTE_CK_BYTE) * usPartLen);
		memcpy(out.pPart.pPart_val, pPart, sizeof(CK_BYTE) * usPartLen);
	}
	out.usPartLen = usPartLen;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_SignFinal_Param * r_ck_c_signfinal_1(R_CK_C_SignFinal_Param *param, CLIENT *cl) {
}
R_CK_C_SignFinal_Param * r_ck_c_signfinal_1_svc(R_CK_C_SignFinal_Param *in, struct svc_req *req) {
	printf("CK_C_SignFinal\n");
	fflush(stdin);
	static R_CK_C_SignFinal_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_BYTE_PTR pSignature;
	static CK_ULONG_PTR pusSignatureLen;
	// Free Unwrapping
	free(pSignature);
	pSignature = NULL;
	free(pusSignatureLen);
	pusSignatureLen = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pSignature.pSignature_len == 0) {
		pSignature = NULL;
	}
	else {
		pSignature = malloc(sizeof(CK_BYTE) * in->pSignature.pSignature_len);
		memcpy(pSignature, in->pSignature.pSignature_val, sizeof(CK_BYTE) * in->pSignature.pSignature_len);
	}
	if (in->pusSignatureLen == NULL) {
		pusSignatureLen = NULL;
	}
	else {
		pusSignatureLen = malloc(sizeof(CK_ULONG));
		memcpy(pusSignatureLen, in->pusSignatureLen, sizeof(CK_ULONG));
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_SignFinal(hSession,pSignature,pusSignatureLen);
	// Free Wrapping
	free(out.pSignature.pSignature_val);
	out.pSignature.pSignature_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pSignature == NULL) {
		out.pSignature.pSignature_val = NULL;
		out.pSignature.pSignature_len = 0;
	}
	else {
		out.pSignature.pSignature_val = malloc(sizeof(REMOTE_CK_BYTE) * (*pusSignatureLen));
		memcpy(out.pSignature.pSignature_val, pSignature, sizeof(CK_BYTE) * (*pusSignatureLen));
	}
	out.pusSignatureLen = pusSignatureLen;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_SignRecoverInit_Param * r_ck_c_signrecoverinit_1(R_CK_C_SignRecoverInit_Param *param, CLIENT *cl) {
}
R_CK_C_SignRecoverInit_Param * r_ck_c_signrecoverinit_1_svc(R_CK_C_SignRecoverInit_Param *in, struct svc_req *req) {
	printf("CK_C_SignRecoverInit\n");
	fflush(stdin);
	static R_CK_C_SignRecoverInit_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_MECHANISM_PTR pMechanism;
	static CK_OBJECT_HANDLE hKey;
	// Free Unwrapping
	free(pMechanism->pParameter);
	pMechanism->pParameter = NULL;
	free(pMechanism);
	pMechanism = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pMechanism == NULL) {
		pMechanism = NULL;
	}
	else {
		pMechanism = malloc(sizeof(CK_MECHANISM));
		pMechanism->mechanism = in->pMechanism->mechanism;
		if (in->pMechanism->pParameter.pParameter_len == 0) {
			pMechanism->pParameter = NULL;
		}
		else {
			pMechanism->pParameter = malloc(sizeof(CK_BYTE) * in->pMechanism->pParameter.pParameter_len);
			memcpy(pMechanism->pParameter, in->pMechanism->pParameter.pParameter_val, sizeof(CK_BYTE) * in->pMechanism->pParameter.pParameter_len);
		}
		pMechanism->ulParameterLen = in->pMechanism->ulParameterLen;
	}
	hKey = in->hKey;
	// End Unwrapping
	//Remote calling
	CK_RV res = C_SignRecoverInit(hSession,pMechanism,hKey);
	// Free Wrapping
	free(out.pMechanism->pParameter.pParameter_val);
	out.pMechanism->pParameter.pParameter_val = NULL;
	free(out.pMechanism);
	out.pMechanism = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pMechanism == NULL) {
		out.pMechanism = NULL;
	}
	else {
		out.pMechanism = malloc(sizeof(REMOTE_CK_MECHANISM));
		out.pMechanism->mechanism = pMechanism->mechanism;
		if (pMechanism->pParameter == NULL) {
			out.pMechanism->pParameter.pParameter_val = NULL;
			out.pMechanism->pParameter.pParameter_len = 0;
		}
		else {
			out.pMechanism->pParameter.pParameter_val = malloc(sizeof(REMOTE_CK_VOID_PTR) * pMechanism->ulParameterLen);
			memcpy(out.pMechanism->pParameter.pParameter_val, pMechanism->pParameter, sizeof(CK_VOID_PTR) * pMechanism->ulParameterLen);
		}
		out.pMechanism->ulParameterLen = pMechanism->ulParameterLen;
	}
	out.hKey = hKey;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_SignRecover_Param * r_ck_c_signrecover_1(R_CK_C_SignRecover_Param *param, CLIENT *cl) {
}
R_CK_C_SignRecover_Param * r_ck_c_signrecover_1_svc(R_CK_C_SignRecover_Param *in, struct svc_req *req) {
	printf("CK_C_SignRecover\n");
	fflush(stdin);
	static R_CK_C_SignRecover_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_BYTE_PTR pData;
	static CK_ULONG usDataLen;
	static CK_BYTE_PTR pSignature;
	static CK_ULONG_PTR pusSignatureLen;
	// Free Unwrapping
	free(pData);
	pData = NULL;
	free(pSignature);
	pSignature = NULL;
	free(pusSignatureLen);
	pusSignatureLen = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pData.pData_len == 0) {
		pData = NULL;
	}
	else {
		pData = malloc(sizeof(CK_BYTE) * in->pData.pData_len);
		memcpy(pData, in->pData.pData_val, sizeof(CK_BYTE) * in->pData.pData_len);
	}
	usDataLen = in->usDataLen;
	if (in->pSignature.pSignature_len == 0) {
		pSignature = NULL;
	}
	else {
		pSignature = malloc(sizeof(CK_BYTE) * in->pSignature.pSignature_len);
		memcpy(pSignature, in->pSignature.pSignature_val, sizeof(CK_BYTE) * in->pSignature.pSignature_len);
	}
	if (in->pusSignatureLen == NULL) {
		pusSignatureLen = NULL;
	}
	else {
		pusSignatureLen = malloc(sizeof(CK_ULONG));
		memcpy(pusSignatureLen, in->pusSignatureLen, sizeof(CK_ULONG));
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_SignRecover(hSession,pData,usDataLen,pSignature,pusSignatureLen);
	// Free Wrapping
	free(out.pData.pData_val);
	out.pData.pData_val = NULL;
	free(out.pSignature.pSignature_val);
	out.pSignature.pSignature_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pData == NULL) {
		out.pData.pData_val = NULL;
		out.pData.pData_len = 0;
	}
	else {
		out.pData.pData_val = malloc(sizeof(REMOTE_CK_BYTE) * usDataLen);
		memcpy(out.pData.pData_val, pData, sizeof(CK_BYTE) * usDataLen);
	}
	out.usDataLen = usDataLen;
	if (pSignature == NULL) {
		out.pSignature.pSignature_val = NULL;
		out.pSignature.pSignature_len = 0;
	}
	else {
		out.pSignature.pSignature_val = malloc(sizeof(REMOTE_CK_BYTE) * (*pusSignatureLen));
		memcpy(out.pSignature.pSignature_val, pSignature, sizeof(CK_BYTE) * (*pusSignatureLen));
	}
	out.pusSignatureLen = pusSignatureLen;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_VerifyInit_Param * r_ck_c_verifyinit_1(R_CK_C_VerifyInit_Param *param, CLIENT *cl) {
}
R_CK_C_VerifyInit_Param * r_ck_c_verifyinit_1_svc(R_CK_C_VerifyInit_Param *in, struct svc_req *req) {
	printf("CK_C_VerifyInit\n");
	fflush(stdin);
	static R_CK_C_VerifyInit_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_MECHANISM_PTR pMechanism;
	static CK_OBJECT_HANDLE hKey;
	// Free Unwrapping
	free(pMechanism->pParameter);
	pMechanism->pParameter = NULL;
	free(pMechanism);
	pMechanism = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pMechanism == NULL) {
		pMechanism = NULL;
	}
	else {
		pMechanism = malloc(sizeof(CK_MECHANISM));
		pMechanism->mechanism = in->pMechanism->mechanism;
		if (in->pMechanism->pParameter.pParameter_len == 0) {
			pMechanism->pParameter = NULL;
		}
		else {
			pMechanism->pParameter = malloc(sizeof(CK_BYTE) * in->pMechanism->pParameter.pParameter_len);
			memcpy(pMechanism->pParameter, in->pMechanism->pParameter.pParameter_val, sizeof(CK_BYTE) * in->pMechanism->pParameter.pParameter_len);
		}
		pMechanism->ulParameterLen = in->pMechanism->ulParameterLen;
	}
	hKey = in->hKey;
	// End Unwrapping
	//Remote calling
	CK_RV res = C_VerifyInit(hSession,pMechanism,hKey);
	// Free Wrapping
	free(out.pMechanism->pParameter.pParameter_val);
	out.pMechanism->pParameter.pParameter_val = NULL;
	free(out.pMechanism);
	out.pMechanism = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pMechanism == NULL) {
		out.pMechanism = NULL;
	}
	else {
		out.pMechanism = malloc(sizeof(REMOTE_CK_MECHANISM));
		out.pMechanism->mechanism = pMechanism->mechanism;
		if (pMechanism->pParameter == NULL) {
			out.pMechanism->pParameter.pParameter_val = NULL;
			out.pMechanism->pParameter.pParameter_len = 0;
		}
		else {
			out.pMechanism->pParameter.pParameter_val = malloc(sizeof(REMOTE_CK_VOID_PTR) * pMechanism->ulParameterLen);
			memcpy(out.pMechanism->pParameter.pParameter_val, pMechanism->pParameter, sizeof(CK_VOID_PTR) * pMechanism->ulParameterLen);
		}
		out.pMechanism->ulParameterLen = pMechanism->ulParameterLen;
	}
	out.hKey = hKey;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_Verify_Param * r_ck_c_verify_1(R_CK_C_Verify_Param *param, CLIENT *cl) {
}
R_CK_C_Verify_Param * r_ck_c_verify_1_svc(R_CK_C_Verify_Param *in, struct svc_req *req) {
	printf("CK_C_Verify\n");
	fflush(stdin);
	static R_CK_C_Verify_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_BYTE_PTR pData;
	static CK_ULONG usDataLen;
	static CK_BYTE_PTR pSignature;
	static CK_ULONG usSignatureLen;
	// Free Unwrapping
	free(pData);
	pData = NULL;
	free(pSignature);
	pSignature = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pData.pData_len == 0) {
		pData = NULL;
	}
	else {
		pData = malloc(sizeof(CK_BYTE) * in->pData.pData_len);
		memcpy(pData, in->pData.pData_val, sizeof(CK_BYTE) * in->pData.pData_len);
	}
	usDataLen = in->usDataLen;
	if (in->pSignature.pSignature_len == 0) {
		pSignature = NULL;
	}
	else {
		pSignature = malloc(sizeof(CK_BYTE) * in->pSignature.pSignature_len);
		memcpy(pSignature, in->pSignature.pSignature_val, sizeof(CK_BYTE) * in->pSignature.pSignature_len);
	}
	usSignatureLen = in->usSignatureLen;
	// End Unwrapping
	//Remote calling
	CK_RV res = C_Verify(hSession,pData,usDataLen,pSignature,usSignatureLen);
	// Free Wrapping
	free(out.pData.pData_val);
	out.pData.pData_val = NULL;
	free(out.pSignature.pSignature_val);
	out.pSignature.pSignature_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pData == NULL) {
		out.pData.pData_val = NULL;
		out.pData.pData_len = 0;
	}
	else {
		out.pData.pData_val = malloc(sizeof(REMOTE_CK_BYTE) * usDataLen);
		memcpy(out.pData.pData_val, pData, sizeof(CK_BYTE) * usDataLen);
	}
	out.usDataLen = usDataLen;
	if (pSignature == NULL) {
		out.pSignature.pSignature_val = NULL;
		out.pSignature.pSignature_len = 0;
	}
	else {
		out.pSignature.pSignature_val = malloc(sizeof(REMOTE_CK_BYTE) * usSignatureLen);
		memcpy(out.pSignature.pSignature_val, pSignature, sizeof(CK_BYTE) * usSignatureLen);
	}
	out.usSignatureLen = usSignatureLen;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_VerifyUpdate_Param * r_ck_c_verifyupdate_1(R_CK_C_VerifyUpdate_Param *param, CLIENT *cl) {
}
R_CK_C_VerifyUpdate_Param * r_ck_c_verifyupdate_1_svc(R_CK_C_VerifyUpdate_Param *in, struct svc_req *req) {
	printf("CK_C_VerifyUpdate\n");
	fflush(stdin);
	static R_CK_C_VerifyUpdate_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_BYTE_PTR pPart;
	static CK_ULONG usPartLen;
	// Free Unwrapping
	free(pPart);
	pPart = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pPart.pPart_len == 0) {
		pPart = NULL;
	}
	else {
		pPart = malloc(sizeof(CK_BYTE) * in->pPart.pPart_len);
		memcpy(pPart, in->pPart.pPart_val, sizeof(CK_BYTE) * in->pPart.pPart_len);
	}
	usPartLen = in->usPartLen;
	// End Unwrapping
	//Remote calling
	CK_RV res = C_VerifyUpdate(hSession,pPart,usPartLen);
	// Free Wrapping
	free(out.pPart.pPart_val);
	out.pPart.pPart_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pPart == NULL) {
		out.pPart.pPart_val = NULL;
		out.pPart.pPart_len = 0;
	}
	else {
		out.pPart.pPart_val = malloc(sizeof(REMOTE_CK_BYTE) * usPartLen);
		memcpy(out.pPart.pPart_val, pPart, sizeof(CK_BYTE) * usPartLen);
	}
	out.usPartLen = usPartLen;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_VerifyFinal_Param * r_ck_c_verifyfinal_1(R_CK_C_VerifyFinal_Param *param, CLIENT *cl) {
}
R_CK_C_VerifyFinal_Param * r_ck_c_verifyfinal_1_svc(R_CK_C_VerifyFinal_Param *in, struct svc_req *req) {
	printf("CK_C_VerifyFinal\n");
	fflush(stdin);
	static R_CK_C_VerifyFinal_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_BYTE_PTR pSignature;
	static CK_ULONG usSignatureLen;
	// Free Unwrapping
	free(pSignature);
	pSignature = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pSignature.pSignature_len == 0) {
		pSignature = NULL;
	}
	else {
		pSignature = malloc(sizeof(CK_BYTE) * in->pSignature.pSignature_len);
		memcpy(pSignature, in->pSignature.pSignature_val, sizeof(CK_BYTE) * in->pSignature.pSignature_len);
	}
	usSignatureLen = in->usSignatureLen;
	// End Unwrapping
	//Remote calling
	CK_RV res = C_VerifyFinal(hSession,pSignature,usSignatureLen);
	// Free Wrapping
	free(out.pSignature.pSignature_val);
	out.pSignature.pSignature_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pSignature == NULL) {
		out.pSignature.pSignature_val = NULL;
		out.pSignature.pSignature_len = 0;
	}
	else {
		out.pSignature.pSignature_val = malloc(sizeof(REMOTE_CK_BYTE) * usSignatureLen);
		memcpy(out.pSignature.pSignature_val, pSignature, sizeof(CK_BYTE) * usSignatureLen);
	}
	out.usSignatureLen = usSignatureLen;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_VerifyRecoverInit_Param * r_ck_c_verifyrecoverinit_1(R_CK_C_VerifyRecoverInit_Param *param, CLIENT *cl) {
}
R_CK_C_VerifyRecoverInit_Param * r_ck_c_verifyrecoverinit_1_svc(R_CK_C_VerifyRecoverInit_Param *in, struct svc_req *req) {
	printf("CK_C_VerifyRecoverInit\n");
	fflush(stdin);
	static R_CK_C_VerifyRecoverInit_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_MECHANISM_PTR pMechanism;
	static CK_OBJECT_HANDLE hKey;
	// Free Unwrapping
	free(pMechanism->pParameter);
	pMechanism->pParameter = NULL;
	free(pMechanism);
	pMechanism = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pMechanism == NULL) {
		pMechanism = NULL;
	}
	else {
		pMechanism = malloc(sizeof(CK_MECHANISM));
		pMechanism->mechanism = in->pMechanism->mechanism;
		if (in->pMechanism->pParameter.pParameter_len == 0) {
			pMechanism->pParameter = NULL;
		}
		else {
			pMechanism->pParameter = malloc(sizeof(CK_BYTE) * in->pMechanism->pParameter.pParameter_len);
			memcpy(pMechanism->pParameter, in->pMechanism->pParameter.pParameter_val, sizeof(CK_BYTE) * in->pMechanism->pParameter.pParameter_len);
		}
		pMechanism->ulParameterLen = in->pMechanism->ulParameterLen;
	}
	hKey = in->hKey;
	// End Unwrapping
	//Remote calling
	CK_RV res = C_VerifyRecoverInit(hSession,pMechanism,hKey);
	// Free Wrapping
	free(out.pMechanism->pParameter.pParameter_val);
	out.pMechanism->pParameter.pParameter_val = NULL;
	free(out.pMechanism);
	out.pMechanism = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pMechanism == NULL) {
		out.pMechanism = NULL;
	}
	else {
		out.pMechanism = malloc(sizeof(REMOTE_CK_MECHANISM));
		out.pMechanism->mechanism = pMechanism->mechanism;
		if (pMechanism->pParameter == NULL) {
			out.pMechanism->pParameter.pParameter_val = NULL;
			out.pMechanism->pParameter.pParameter_len = 0;
		}
		else {
			out.pMechanism->pParameter.pParameter_val = malloc(sizeof(REMOTE_CK_VOID_PTR) * pMechanism->ulParameterLen);
			memcpy(out.pMechanism->pParameter.pParameter_val, pMechanism->pParameter, sizeof(CK_VOID_PTR) * pMechanism->ulParameterLen);
		}
		out.pMechanism->ulParameterLen = pMechanism->ulParameterLen;
	}
	out.hKey = hKey;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_VerifyRecover_Param * r_ck_c_verifyrecover_1(R_CK_C_VerifyRecover_Param *param, CLIENT *cl) {
}
R_CK_C_VerifyRecover_Param * r_ck_c_verifyrecover_1_svc(R_CK_C_VerifyRecover_Param *in, struct svc_req *req) {
	printf("CK_C_VerifyRecover\n");
	fflush(stdin);
	static R_CK_C_VerifyRecover_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_BYTE_PTR pSignature;
	static CK_ULONG usSignatureLen;
	static CK_BYTE_PTR pData;
	static CK_ULONG_PTR pusDataLen;
	// Free Unwrapping
	free(pSignature);
	pSignature = NULL;
	free(pData);
	pData = NULL;
	free(pusDataLen);
	pusDataLen = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pSignature.pSignature_len == 0) {
		pSignature = NULL;
	}
	else {
		pSignature = malloc(sizeof(CK_BYTE) * in->pSignature.pSignature_len);
		memcpy(pSignature, in->pSignature.pSignature_val, sizeof(CK_BYTE) * in->pSignature.pSignature_len);
	}
	usSignatureLen = in->usSignatureLen;
	if (in->pData.pData_len == 0) {
		pData = NULL;
	}
	else {
		pData = malloc(sizeof(CK_BYTE) * in->pData.pData_len);
		memcpy(pData, in->pData.pData_val, sizeof(CK_BYTE) * in->pData.pData_len);
	}
	if (in->pusDataLen == NULL) {
		pusDataLen = NULL;
	}
	else {
		pusDataLen = malloc(sizeof(CK_ULONG));
		memcpy(pusDataLen, in->pusDataLen, sizeof(CK_ULONG));
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_VerifyRecover(hSession,pSignature,usSignatureLen,pData,pusDataLen);
	// Free Wrapping
	free(out.pSignature.pSignature_val);
	out.pSignature.pSignature_val = NULL;
	free(out.pData.pData_val);
	out.pData.pData_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pSignature == NULL) {
		out.pSignature.pSignature_val = NULL;
		out.pSignature.pSignature_len = 0;
	}
	else {
		out.pSignature.pSignature_val = malloc(sizeof(REMOTE_CK_BYTE) * usSignatureLen);
		memcpy(out.pSignature.pSignature_val, pSignature, sizeof(CK_BYTE) * usSignatureLen);
	}
	out.usSignatureLen = usSignatureLen;
	if (pData == NULL) {
		out.pData.pData_val = NULL;
		out.pData.pData_len = 0;
	}
	else {
		out.pData.pData_val = malloc(sizeof(REMOTE_CK_BYTE) * (*pusDataLen));
		memcpy(out.pData.pData_val, pData, sizeof(CK_BYTE) * (*pusDataLen));
	}
	out.pusDataLen = pusDataLen;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_DigestEncryptUpdate_Param * r_ck_c_digestencryptupdate_1(R_CK_C_DigestEncryptUpdate_Param *param, CLIENT *cl) {
}
R_CK_C_DigestEncryptUpdate_Param * r_ck_c_digestencryptupdate_1_svc(R_CK_C_DigestEncryptUpdate_Param *in, struct svc_req *req) {
	printf("CK_C_DigestEncryptUpdate\n");
	fflush(stdin);
	static R_CK_C_DigestEncryptUpdate_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_BYTE_PTR pPart;
	static CK_ULONG ulPartLen;
	static CK_BYTE_PTR pEncryptedPart;
	static CK_ULONG_PTR pulEncryptedPartLen;
	// Free Unwrapping
	free(pPart);
	pPart = NULL;
	free(pEncryptedPart);
	pEncryptedPart = NULL;
	free(pulEncryptedPartLen);
	pulEncryptedPartLen = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pPart.pPart_len == 0) {
		pPart = NULL;
	}
	else {
		pPart = malloc(sizeof(CK_BYTE) * in->pPart.pPart_len);
		memcpy(pPart, in->pPart.pPart_val, sizeof(CK_BYTE) * in->pPart.pPart_len);
	}
	ulPartLen = in->ulPartLen;
	if (in->pEncryptedPart.pEncryptedPart_len == 0) {
		pEncryptedPart = NULL;
	}
	else {
		pEncryptedPart = malloc(sizeof(CK_BYTE) * in->pEncryptedPart.pEncryptedPart_len);
		memcpy(pEncryptedPart, in->pEncryptedPart.pEncryptedPart_val, sizeof(CK_BYTE) * in->pEncryptedPart.pEncryptedPart_len);
	}
	if (in->pulEncryptedPartLen == NULL) {
		pulEncryptedPartLen = NULL;
	}
	else {
		pulEncryptedPartLen = malloc(sizeof(CK_ULONG));
		memcpy(pulEncryptedPartLen, in->pulEncryptedPartLen, sizeof(CK_ULONG));
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_DigestEncryptUpdate(hSession,pPart,ulPartLen,pEncryptedPart,pulEncryptedPartLen);
	// Free Wrapping
	free(out.pPart.pPart_val);
	out.pPart.pPart_val = NULL;
	free(out.pEncryptedPart.pEncryptedPart_val);
	out.pEncryptedPart.pEncryptedPart_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pPart == NULL) {
		out.pPart.pPart_val = NULL;
		out.pPart.pPart_len = 0;
	}
	else {
		out.pPart.pPart_val = malloc(sizeof(REMOTE_CK_BYTE) * ulPartLen);
		memcpy(out.pPart.pPart_val, pPart, sizeof(CK_BYTE) * ulPartLen);
	}
	out.ulPartLen = ulPartLen;
	if (pEncryptedPart == NULL) {
		out.pEncryptedPart.pEncryptedPart_val = NULL;
		out.pEncryptedPart.pEncryptedPart_len = 0;
	}
	else {
		out.pEncryptedPart.pEncryptedPart_val = malloc(sizeof(REMOTE_CK_BYTE) * (*pulEncryptedPartLen));
		memcpy(out.pEncryptedPart.pEncryptedPart_val, pEncryptedPart, sizeof(CK_BYTE) * (*pulEncryptedPartLen));
	}
	out.pulEncryptedPartLen = pulEncryptedPartLen;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_DecryptDigestUpdate_Param * r_ck_c_decryptdigestupdate_1(R_CK_C_DecryptDigestUpdate_Param *param, CLIENT *cl) {
}
R_CK_C_DecryptDigestUpdate_Param * r_ck_c_decryptdigestupdate_1_svc(R_CK_C_DecryptDigestUpdate_Param *in, struct svc_req *req) {
	printf("CK_C_DecryptDigestUpdate\n");
	fflush(stdin);
	static R_CK_C_DecryptDigestUpdate_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_BYTE_PTR pEncryptedPart;
	static CK_ULONG ulEncryptedPartLen;
	static CK_BYTE_PTR pPart;
	static CK_ULONG_PTR pulPartLen;
	// Free Unwrapping
	free(pEncryptedPart);
	pEncryptedPart = NULL;
	free(pPart);
	pPart = NULL;
	free(pulPartLen);
	pulPartLen = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pEncryptedPart.pEncryptedPart_len == 0) {
		pEncryptedPart = NULL;
	}
	else {
		pEncryptedPart = malloc(sizeof(CK_BYTE) * in->pEncryptedPart.pEncryptedPart_len);
		memcpy(pEncryptedPart, in->pEncryptedPart.pEncryptedPart_val, sizeof(CK_BYTE) * in->pEncryptedPart.pEncryptedPart_len);
	}
	ulEncryptedPartLen = in->ulEncryptedPartLen;
	if (in->pPart.pPart_len == 0) {
		pPart = NULL;
	}
	else {
		pPart = malloc(sizeof(CK_BYTE) * in->pPart.pPart_len);
		memcpy(pPart, in->pPart.pPart_val, sizeof(CK_BYTE) * in->pPart.pPart_len);
	}
	if (in->pulPartLen == NULL) {
		pulPartLen = NULL;
	}
	else {
		pulPartLen = malloc(sizeof(CK_ULONG));
		memcpy(pulPartLen, in->pulPartLen, sizeof(CK_ULONG));
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_DecryptDigestUpdate(hSession,pEncryptedPart,ulEncryptedPartLen,pPart,pulPartLen);
	// Free Wrapping
	free(out.pEncryptedPart.pEncryptedPart_val);
	out.pEncryptedPart.pEncryptedPart_val = NULL;
	free(out.pPart.pPart_val);
	out.pPart.pPart_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pEncryptedPart == NULL) {
		out.pEncryptedPart.pEncryptedPart_val = NULL;
		out.pEncryptedPart.pEncryptedPart_len = 0;
	}
	else {
		out.pEncryptedPart.pEncryptedPart_val = malloc(sizeof(REMOTE_CK_BYTE) * ulEncryptedPartLen);
		memcpy(out.pEncryptedPart.pEncryptedPart_val, pEncryptedPart, sizeof(CK_BYTE) * ulEncryptedPartLen);
	}
	out.ulEncryptedPartLen = ulEncryptedPartLen;
	if (pPart == NULL) {
		out.pPart.pPart_val = NULL;
		out.pPart.pPart_len = 0;
	}
	else {
		out.pPart.pPart_val = malloc(sizeof(REMOTE_CK_BYTE) * (*pulPartLen));
		memcpy(out.pPart.pPart_val, pPart, sizeof(CK_BYTE) * (*pulPartLen));
	}
	out.pulPartLen = pulPartLen;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_SignEncryptUpdate_Param * r_ck_c_signencryptupdate_1(R_CK_C_SignEncryptUpdate_Param *param, CLIENT *cl) {
}
R_CK_C_SignEncryptUpdate_Param * r_ck_c_signencryptupdate_1_svc(R_CK_C_SignEncryptUpdate_Param *in, struct svc_req *req) {
	printf("CK_C_SignEncryptUpdate\n");
	fflush(stdin);
	static R_CK_C_SignEncryptUpdate_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_BYTE_PTR pPart;
	static CK_ULONG ulPartLen;
	static CK_BYTE_PTR pEncryptedPart;
	static CK_ULONG_PTR pulEncryptedPartLen;
	// Free Unwrapping
	free(pPart);
	pPart = NULL;
	free(pEncryptedPart);
	pEncryptedPart = NULL;
	free(pulEncryptedPartLen);
	pulEncryptedPartLen = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pPart.pPart_len == 0) {
		pPart = NULL;
	}
	else {
		pPart = malloc(sizeof(CK_BYTE) * in->pPart.pPart_len);
		memcpy(pPart, in->pPart.pPart_val, sizeof(CK_BYTE) * in->pPart.pPart_len);
	}
	ulPartLen = in->ulPartLen;
	if (in->pEncryptedPart.pEncryptedPart_len == 0) {
		pEncryptedPart = NULL;
	}
	else {
		pEncryptedPart = malloc(sizeof(CK_BYTE) * in->pEncryptedPart.pEncryptedPart_len);
		memcpy(pEncryptedPart, in->pEncryptedPart.pEncryptedPart_val, sizeof(CK_BYTE) * in->pEncryptedPart.pEncryptedPart_len);
	}
	if (in->pulEncryptedPartLen == NULL) {
		pulEncryptedPartLen = NULL;
	}
	else {
		pulEncryptedPartLen = malloc(sizeof(CK_ULONG));
		memcpy(pulEncryptedPartLen, in->pulEncryptedPartLen, sizeof(CK_ULONG));
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_SignEncryptUpdate(hSession,pPart,ulPartLen,pEncryptedPart,pulEncryptedPartLen);
	// Free Wrapping
	free(out.pPart.pPart_val);
	out.pPart.pPart_val = NULL;
	free(out.pEncryptedPart.pEncryptedPart_val);
	out.pEncryptedPart.pEncryptedPart_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pPart == NULL) {
		out.pPart.pPart_val = NULL;
		out.pPart.pPart_len = 0;
	}
	else {
		out.pPart.pPart_val = malloc(sizeof(REMOTE_CK_BYTE) * ulPartLen);
		memcpy(out.pPart.pPart_val, pPart, sizeof(CK_BYTE) * ulPartLen);
	}
	out.ulPartLen = ulPartLen;
	if (pEncryptedPart == NULL) {
		out.pEncryptedPart.pEncryptedPart_val = NULL;
		out.pEncryptedPart.pEncryptedPart_len = 0;
	}
	else {
		out.pEncryptedPart.pEncryptedPart_val = malloc(sizeof(REMOTE_CK_BYTE) * (*pulEncryptedPartLen));
		memcpy(out.pEncryptedPart.pEncryptedPart_val, pEncryptedPart, sizeof(CK_BYTE) * (*pulEncryptedPartLen));
	}
	out.pulEncryptedPartLen = pulEncryptedPartLen;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_DecryptVerifyUpdate_Param * r_ck_c_decryptverifyupdate_1(R_CK_C_DecryptVerifyUpdate_Param *param, CLIENT *cl) {
}
R_CK_C_DecryptVerifyUpdate_Param * r_ck_c_decryptverifyupdate_1_svc(R_CK_C_DecryptVerifyUpdate_Param *in, struct svc_req *req) {
	printf("CK_C_DecryptVerifyUpdate\n");
	fflush(stdin);
	static R_CK_C_DecryptVerifyUpdate_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_BYTE_PTR pEncryptedPart;
	static CK_ULONG ulEncryptedPartLen;
	static CK_BYTE_PTR pPart;
	static CK_ULONG_PTR pulPartLen;
	// Free Unwrapping
	free(pEncryptedPart);
	pEncryptedPart = NULL;
	free(pPart);
	pPart = NULL;
	free(pulPartLen);
	pulPartLen = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pEncryptedPart.pEncryptedPart_len == 0) {
		pEncryptedPart = NULL;
	}
	else {
		pEncryptedPart = malloc(sizeof(CK_BYTE) * in->pEncryptedPart.pEncryptedPart_len);
		memcpy(pEncryptedPart, in->pEncryptedPart.pEncryptedPart_val, sizeof(CK_BYTE) * in->pEncryptedPart.pEncryptedPart_len);
	}
	ulEncryptedPartLen = in->ulEncryptedPartLen;
	if (in->pPart.pPart_len == 0) {
		pPart = NULL;
	}
	else {
		pPart = malloc(sizeof(CK_BYTE) * in->pPart.pPart_len);
		memcpy(pPart, in->pPart.pPart_val, sizeof(CK_BYTE) * in->pPart.pPart_len);
	}
	if (in->pulPartLen == NULL) {
		pulPartLen = NULL;
	}
	else {
		pulPartLen = malloc(sizeof(CK_ULONG));
		memcpy(pulPartLen, in->pulPartLen, sizeof(CK_ULONG));
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_DecryptVerifyUpdate(hSession,pEncryptedPart,ulEncryptedPartLen,pPart,pulPartLen);
	// Free Wrapping
	free(out.pEncryptedPart.pEncryptedPart_val);
	out.pEncryptedPart.pEncryptedPart_val = NULL;
	free(out.pPart.pPart_val);
	out.pPart.pPart_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pEncryptedPart == NULL) {
		out.pEncryptedPart.pEncryptedPart_val = NULL;
		out.pEncryptedPart.pEncryptedPart_len = 0;
	}
	else {
		out.pEncryptedPart.pEncryptedPart_val = malloc(sizeof(REMOTE_CK_BYTE) * ulEncryptedPartLen);
		memcpy(out.pEncryptedPart.pEncryptedPart_val, pEncryptedPart, sizeof(CK_BYTE) * ulEncryptedPartLen);
	}
	out.ulEncryptedPartLen = ulEncryptedPartLen;
	if (pPart == NULL) {
		out.pPart.pPart_val = NULL;
		out.pPart.pPart_len = 0;
	}
	else {
		out.pPart.pPart_val = malloc(sizeof(REMOTE_CK_BYTE) * (*pulPartLen));
		memcpy(out.pPart.pPart_val, pPart, sizeof(CK_BYTE) * (*pulPartLen));
	}
	out.pulPartLen = pulPartLen;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_GenerateKey_Param * r_ck_c_generatekey_1(R_CK_C_GenerateKey_Param *param, CLIENT *cl) {
}
R_CK_C_GenerateKey_Param * r_ck_c_generatekey_1_svc(R_CK_C_GenerateKey_Param *in, struct svc_req *req) {
	printf("CK_C_GenerateKey\n");
	fflush(stdin);
	static R_CK_C_GenerateKey_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_MECHANISM_PTR pMechanism;
	static CK_ATTRIBUTE_PTR pTemplate;
	static CK_ULONG usCount;
	static CK_OBJECT_HANDLE_PTR phKey;
	// Free Unwrapping
	free(pMechanism->pParameter);
	pMechanism->pParameter = NULL;
	free(pMechanism);
	pMechanism = NULL;
	if (pTemplate != NULL) {
		CK_ATTRIBUTE *pLocal = pTemplate;
		free_unwrap_CK_ATTRIBUTE(pLocal, (int) usCount);
	}
	free(pTemplate);
	pTemplate = NULL;
	free(phKey);
	phKey = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pMechanism == NULL) {
		pMechanism = NULL;
	}
	else {
		pMechanism = malloc(sizeof(CK_MECHANISM));
		pMechanism->mechanism = in->pMechanism->mechanism;
		if (in->pMechanism->pParameter.pParameter_len == 0) {
			pMechanism->pParameter = NULL;
		}
		else {
			pMechanism->pParameter = malloc(sizeof(CK_BYTE) * in->pMechanism->pParameter.pParameter_len);
			memcpy(pMechanism->pParameter, in->pMechanism->pParameter.pParameter_val, sizeof(CK_BYTE) * in->pMechanism->pParameter.pParameter_len);
		}
		pMechanism->ulParameterLen = in->pMechanism->ulParameterLen;
	}
	if (in->pTemplate.pTemplate_len == 0) {
		pTemplate = NULL;
	}
	else {
		pTemplate = malloc(sizeof(CK_ATTRIBUTE) * in->pTemplate.pTemplate_len);
		CK_ATTRIBUTE *pLocal = pTemplate;
		REMOTE_CK_ATTRIBUTE *pRemote = in->pTemplate.pTemplate_val;
		unwrap_CK_ATTRIBUTE(pLocal, pRemote, &(in->usCount));
	}
	usCount = in->usCount;
	if (in->phKey == NULL) {
		phKey = NULL;
	}
	else {
		phKey = malloc(sizeof(CK_OBJECT_HANDLE));
		memcpy(phKey, in->phKey, sizeof(CK_OBJECT_HANDLE));
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_GenerateKey(hSession,pMechanism,pTemplate,usCount,phKey);
	// Free Wrapping
	free(out.pMechanism->pParameter.pParameter_val);
	out.pMechanism->pParameter.pParameter_val = NULL;
	free(out.pMechanism);
	out.pMechanism = NULL;
	if (out.pTemplate.pTemplate_val != NULL) {
		REMOTE_CK_ATTRIBUTE *pRemote = out.pTemplate.pTemplate_val;
		free_wrap_CK_ATTRIBUTE(pRemote, (int) out.pTemplate.pTemplate_len);
	}
	free(out.pTemplate.pTemplate_val);
	out.pTemplate.pTemplate_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pMechanism == NULL) {
		out.pMechanism = NULL;
	}
	else {
		out.pMechanism = malloc(sizeof(REMOTE_CK_MECHANISM));
		out.pMechanism->mechanism = pMechanism->mechanism;
		if (pMechanism->pParameter == NULL) {
			out.pMechanism->pParameter.pParameter_val = NULL;
			out.pMechanism->pParameter.pParameter_len = 0;
		}
		else {
			out.pMechanism->pParameter.pParameter_val = malloc(sizeof(REMOTE_CK_VOID_PTR) * pMechanism->ulParameterLen);
			memcpy(out.pMechanism->pParameter.pParameter_val, pMechanism->pParameter, sizeof(CK_VOID_PTR) * pMechanism->ulParameterLen);
		}
		out.pMechanism->ulParameterLen = pMechanism->ulParameterLen;
	}
	if (pTemplate == NULL) {
		out.pTemplate.pTemplate_val = NULL;
		out.pTemplate.pTemplate_len = 0;
	}
	else {
		out.pTemplate.pTemplate_val = malloc(sizeof(REMOTE_CK_ATTRIBUTE) * usCount);
		CK_ATTRIBUTE *pLocal = pTemplate;
		REMOTE_CK_ATTRIBUTE *pRemote = out.pTemplate.pTemplate_val;
		wrap_CK_ATTRIBUTE(pLocal, pRemote, &usCount);
	}
	out.usCount = usCount;
	out.phKey = phKey;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_GenerateKeyPair_Param * r_ck_c_generatekeypair_1(R_CK_C_GenerateKeyPair_Param *param, CLIENT *cl) {
}
R_CK_C_GenerateKeyPair_Param * r_ck_c_generatekeypair_1_svc(R_CK_C_GenerateKeyPair_Param *in, struct svc_req *req) {
	printf("CK_C_GenerateKeyPair\n");
	fflush(stdin);
	static R_CK_C_GenerateKeyPair_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_MECHANISM_PTR pMechanism;
	static CK_ATTRIBUTE_PTR pPublicKeyTemplate;
	static CK_ULONG usPublicKeyAttributeCount;
	static CK_ATTRIBUTE_PTR pPrivateKeyTemplate;
	static CK_ULONG usPrivateKeyAttributeCount;
	static CK_OBJECT_HANDLE_PTR phPrivateKey;
	static CK_OBJECT_HANDLE_PTR phPublicKey;
	// Free Unwrapping
	free(pMechanism->pParameter);
	pMechanism->pParameter = NULL;
	free(pMechanism);
	pMechanism = NULL;
	if (pPublicKeyTemplate != NULL) {
		CK_ATTRIBUTE *pLocal = pPublicKeyTemplate;
		free_unwrap_CK_ATTRIBUTE(pLocal, (int) usPublicKeyAttributeCount);
	}
	free(pPublicKeyTemplate);
	pPublicKeyTemplate = NULL;
	if (pPrivateKeyTemplate != NULL) {
		CK_ATTRIBUTE *pLocal = pPrivateKeyTemplate;
		free_unwrap_CK_ATTRIBUTE(pLocal, (int) usPrivateKeyAttributeCount);
	}
	free(pPrivateKeyTemplate);
	pPrivateKeyTemplate = NULL;
	free(phPrivateKey);
	phPrivateKey = NULL;
	free(phPublicKey);
	phPublicKey = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pMechanism == NULL) {
		pMechanism = NULL;
	}
	else {
		pMechanism = malloc(sizeof(CK_MECHANISM));
		pMechanism->mechanism = in->pMechanism->mechanism;
		if (in->pMechanism->pParameter.pParameter_len == 0) {
			pMechanism->pParameter = NULL;
		}
		else {
			pMechanism->pParameter = malloc(sizeof(CK_BYTE) * in->pMechanism->pParameter.pParameter_len);
			memcpy(pMechanism->pParameter, in->pMechanism->pParameter.pParameter_val, sizeof(CK_BYTE) * in->pMechanism->pParameter.pParameter_len);
		}
		pMechanism->ulParameterLen = in->pMechanism->ulParameterLen;
	}
	if (in->pPublicKeyTemplate.pPublicKeyTemplate_len == 0) {
		pPublicKeyTemplate = NULL;
	}
	else {
		pPublicKeyTemplate = malloc(sizeof(CK_ATTRIBUTE) * in->pPublicKeyTemplate.pPublicKeyTemplate_len);
		CK_ATTRIBUTE *pLocal = pPublicKeyTemplate;
		REMOTE_CK_ATTRIBUTE *pRemote = in->pPublicKeyTemplate.pPublicKeyTemplate_val;
		unwrap_CK_ATTRIBUTE(pLocal, pRemote, &(in->usPublicKeyAttributeCount));
	}
	usPublicKeyAttributeCount = in->usPublicKeyAttributeCount;
	if (in->pPrivateKeyTemplate.pPrivateKeyTemplate_len == 0) {
		pPrivateKeyTemplate = NULL;
	}
	else {
		pPrivateKeyTemplate = malloc(sizeof(CK_ATTRIBUTE) * in->pPrivateKeyTemplate.pPrivateKeyTemplate_len);
		CK_ATTRIBUTE *pLocal = pPrivateKeyTemplate;
		REMOTE_CK_ATTRIBUTE *pRemote = in->pPrivateKeyTemplate.pPrivateKeyTemplate_val;
		unwrap_CK_ATTRIBUTE(pLocal, pRemote, &(in->usPrivateKeyAttributeCount));
	}
	usPrivateKeyAttributeCount = in->usPrivateKeyAttributeCount;
	if (in->phPrivateKey == NULL) {
		phPrivateKey = NULL;
	}
	else {
		phPrivateKey = malloc(sizeof(CK_OBJECT_HANDLE));
		memcpy(phPrivateKey, in->phPrivateKey, sizeof(CK_OBJECT_HANDLE));
	}
	if (in->phPublicKey == NULL) {
		phPublicKey = NULL;
	}
	else {
		phPublicKey = malloc(sizeof(CK_OBJECT_HANDLE));
		memcpy(phPublicKey, in->phPublicKey, sizeof(CK_OBJECT_HANDLE));
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_GenerateKeyPair(hSession,pMechanism,pPublicKeyTemplate,usPublicKeyAttributeCount,pPrivateKeyTemplate,usPrivateKeyAttributeCount,phPrivateKey,phPublicKey);
	// Free Wrapping
	free(out.pMechanism->pParameter.pParameter_val);
	out.pMechanism->pParameter.pParameter_val = NULL;
	free(out.pMechanism);
	out.pMechanism = NULL;
	if (out.pPublicKeyTemplate.pPublicKeyTemplate_val != NULL) {
		REMOTE_CK_ATTRIBUTE *pRemote = out.pPublicKeyTemplate.pPublicKeyTemplate_val;
		free_wrap_CK_ATTRIBUTE(pRemote, (int) out.pPublicKeyTemplate.pPublicKeyTemplate_len);
	}
	free(out.pPublicKeyTemplate.pPublicKeyTemplate_val);
	out.pPublicKeyTemplate.pPublicKeyTemplate_val = NULL;
	if (out.pPrivateKeyTemplate.pPrivateKeyTemplate_val != NULL) {
		REMOTE_CK_ATTRIBUTE *pRemote = out.pPrivateKeyTemplate.pPrivateKeyTemplate_val;
		free_wrap_CK_ATTRIBUTE(pRemote, (int) out.pPrivateKeyTemplate.pPrivateKeyTemplate_len);
	}
	free(out.pPrivateKeyTemplate.pPrivateKeyTemplate_val);
	out.pPrivateKeyTemplate.pPrivateKeyTemplate_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pMechanism == NULL) {
		out.pMechanism = NULL;
	}
	else {
		out.pMechanism = malloc(sizeof(REMOTE_CK_MECHANISM));
		out.pMechanism->mechanism = pMechanism->mechanism;
		if (pMechanism->pParameter == NULL) {
			out.pMechanism->pParameter.pParameter_val = NULL;
			out.pMechanism->pParameter.pParameter_len = 0;
		}
		else {
			out.pMechanism->pParameter.pParameter_val = malloc(sizeof(REMOTE_CK_VOID_PTR) * pMechanism->ulParameterLen);
			memcpy(out.pMechanism->pParameter.pParameter_val, pMechanism->pParameter, sizeof(CK_VOID_PTR) * pMechanism->ulParameterLen);
		}
		out.pMechanism->ulParameterLen = pMechanism->ulParameterLen;
	}
	if (pPublicKeyTemplate == NULL) {
		out.pPublicKeyTemplate.pPublicKeyTemplate_val = NULL;
		out.pPublicKeyTemplate.pPublicKeyTemplate_len = 0;
	}
	else {
		out.pPublicKeyTemplate.pPublicKeyTemplate_val = malloc(sizeof(REMOTE_CK_ATTRIBUTE) * usPublicKeyAttributeCount);
		CK_ATTRIBUTE *pLocal = pPublicKeyTemplate;
		REMOTE_CK_ATTRIBUTE *pRemote = out.pPublicKeyTemplate.pPublicKeyTemplate_val;
		wrap_CK_ATTRIBUTE(pLocal, pRemote, &usPublicKeyAttributeCount);
	}
	out.usPublicKeyAttributeCount = usPublicKeyAttributeCount;
	if (pPrivateKeyTemplate == NULL) {
		out.pPrivateKeyTemplate.pPrivateKeyTemplate_val = NULL;
		out.pPrivateKeyTemplate.pPrivateKeyTemplate_len = 0;
	}
	else {
		out.pPrivateKeyTemplate.pPrivateKeyTemplate_val = malloc(sizeof(REMOTE_CK_ATTRIBUTE) * usPrivateKeyAttributeCount);
		CK_ATTRIBUTE *pLocal = pPrivateKeyTemplate;
		REMOTE_CK_ATTRIBUTE *pRemote = out.pPrivateKeyTemplate.pPrivateKeyTemplate_val;
		wrap_CK_ATTRIBUTE(pLocal, pRemote, &usPrivateKeyAttributeCount);
	}
	out.usPrivateKeyAttributeCount = usPrivateKeyAttributeCount;
	out.phPrivateKey = phPrivateKey;
	out.phPublicKey = phPublicKey;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_WrapKey_Param * r_ck_c_wrapkey_1(R_CK_C_WrapKey_Param *param, CLIENT *cl) {
}
R_CK_C_WrapKey_Param * r_ck_c_wrapkey_1_svc(R_CK_C_WrapKey_Param *in, struct svc_req *req) {
	printf("CK_C_WrapKey\n");
	fflush(stdin);
	static R_CK_C_WrapKey_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_MECHANISM_PTR pMechanism;
	static CK_OBJECT_HANDLE hWrappingKey;
	static CK_OBJECT_HANDLE hKey;
	static CK_BYTE_PTR pWrappedKey;
	static CK_ULONG_PTR pusWrappedKeyLen;
	// Free Unwrapping
	free(pMechanism->pParameter);
	pMechanism->pParameter = NULL;
	free(pMechanism);
	pMechanism = NULL;
	free(pWrappedKey);
	pWrappedKey = NULL;
	free(pusWrappedKeyLen);
	pusWrappedKeyLen = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pMechanism == NULL) {
		pMechanism = NULL;
	}
	else {
		pMechanism = malloc(sizeof(CK_MECHANISM));
		pMechanism->mechanism = in->pMechanism->mechanism;
		if (in->pMechanism->pParameter.pParameter_len == 0) {
			pMechanism->pParameter = NULL;
		}
		else {
			pMechanism->pParameter = malloc(sizeof(CK_BYTE) * in->pMechanism->pParameter.pParameter_len);
			memcpy(pMechanism->pParameter, in->pMechanism->pParameter.pParameter_val, sizeof(CK_BYTE) * in->pMechanism->pParameter.pParameter_len);
		}
		pMechanism->ulParameterLen = in->pMechanism->ulParameterLen;
	}
	hWrappingKey = in->hWrappingKey;
	hKey = in->hKey;
	if (in->pWrappedKey.pWrappedKey_len == 0) {
		pWrappedKey = NULL;
	}
	else {
		pWrappedKey = malloc(sizeof(CK_BYTE) * in->pWrappedKey.pWrappedKey_len);
		memcpy(pWrappedKey, in->pWrappedKey.pWrappedKey_val, sizeof(CK_BYTE) * in->pWrappedKey.pWrappedKey_len);
	}
	if (in->pusWrappedKeyLen == NULL) {
		pusWrappedKeyLen = NULL;
	}
	else {
		pusWrappedKeyLen = malloc(sizeof(CK_ULONG));
		memcpy(pusWrappedKeyLen, in->pusWrappedKeyLen, sizeof(CK_ULONG));
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_WrapKey(hSession,pMechanism,hWrappingKey,hKey,pWrappedKey,pusWrappedKeyLen);
	// Free Wrapping
	free(out.pMechanism->pParameter.pParameter_val);
	out.pMechanism->pParameter.pParameter_val = NULL;
	free(out.pMechanism);
	out.pMechanism = NULL;
	free(out.pWrappedKey.pWrappedKey_val);
	out.pWrappedKey.pWrappedKey_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pMechanism == NULL) {
		out.pMechanism = NULL;
	}
	else {
		out.pMechanism = malloc(sizeof(REMOTE_CK_MECHANISM));
		out.pMechanism->mechanism = pMechanism->mechanism;
		if (pMechanism->pParameter == NULL) {
			out.pMechanism->pParameter.pParameter_val = NULL;
			out.pMechanism->pParameter.pParameter_len = 0;
		}
		else {
			out.pMechanism->pParameter.pParameter_val = malloc(sizeof(REMOTE_CK_VOID_PTR) * pMechanism->ulParameterLen);
			memcpy(out.pMechanism->pParameter.pParameter_val, pMechanism->pParameter, sizeof(CK_VOID_PTR) * pMechanism->ulParameterLen);
		}
		out.pMechanism->ulParameterLen = pMechanism->ulParameterLen;
	}
	out.hWrappingKey = hWrappingKey;
	out.hKey = hKey;
	if (pWrappedKey == NULL) {
		out.pWrappedKey.pWrappedKey_val = NULL;
		out.pWrappedKey.pWrappedKey_len = 0;
	}
	else {
		out.pWrappedKey.pWrappedKey_val = malloc(sizeof(REMOTE_CK_BYTE) * (*pusWrappedKeyLen));
		memcpy(out.pWrappedKey.pWrappedKey_val, pWrappedKey, sizeof(CK_BYTE) * (*pusWrappedKeyLen));
	}
	out.pusWrappedKeyLen = pusWrappedKeyLen;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_UnwrapKey_Param * r_ck_c_unwrapkey_1(R_CK_C_UnwrapKey_Param *param, CLIENT *cl) {
}
R_CK_C_UnwrapKey_Param * r_ck_c_unwrapkey_1_svc(R_CK_C_UnwrapKey_Param *in, struct svc_req *req) {
	printf("CK_C_UnwrapKey\n");
	fflush(stdin);
	static R_CK_C_UnwrapKey_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_MECHANISM_PTR pMechanism;
	static CK_OBJECT_HANDLE hUnwrappingKey;
	static CK_BYTE_PTR pWrappedKey;
	static CK_ULONG usWrappedKeyLen;
	static CK_ATTRIBUTE_PTR pTemplate;
	static CK_ULONG usAttributeCount;
	static CK_OBJECT_HANDLE_PTR phKey;
	// Free Unwrapping
	free(pMechanism->pParameter);
	pMechanism->pParameter = NULL;
	free(pMechanism);
	pMechanism = NULL;
	free(pWrappedKey);
	pWrappedKey = NULL;
	if (pTemplate != NULL) {
		CK_ATTRIBUTE *pLocal = pTemplate;
		free_unwrap_CK_ATTRIBUTE(pLocal, (int) usAttributeCount);
	}
	free(pTemplate);
	pTemplate = NULL;
	free(phKey);
	phKey = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pMechanism == NULL) {
		pMechanism = NULL;
	}
	else {
		pMechanism = malloc(sizeof(CK_MECHANISM));
		pMechanism->mechanism = in->pMechanism->mechanism;
		if (in->pMechanism->pParameter.pParameter_len == 0) {
			pMechanism->pParameter = NULL;
		}
		else {
			pMechanism->pParameter = malloc(sizeof(CK_BYTE) * in->pMechanism->pParameter.pParameter_len);
			memcpy(pMechanism->pParameter, in->pMechanism->pParameter.pParameter_val, sizeof(CK_BYTE) * in->pMechanism->pParameter.pParameter_len);
		}
		pMechanism->ulParameterLen = in->pMechanism->ulParameterLen;
	}
	hUnwrappingKey = in->hUnwrappingKey;
	if (in->pWrappedKey.pWrappedKey_len == 0) {
		pWrappedKey = NULL;
	}
	else {
		pWrappedKey = malloc(sizeof(CK_BYTE) * in->pWrappedKey.pWrappedKey_len);
		memcpy(pWrappedKey, in->pWrappedKey.pWrappedKey_val, sizeof(CK_BYTE) * in->pWrappedKey.pWrappedKey_len);
	}
	usWrappedKeyLen = in->usWrappedKeyLen;
	if (in->pTemplate.pTemplate_len == 0) {
		pTemplate = NULL;
	}
	else {
		pTemplate = malloc(sizeof(CK_ATTRIBUTE) * in->pTemplate.pTemplate_len);
		CK_ATTRIBUTE *pLocal = pTemplate;
		REMOTE_CK_ATTRIBUTE *pRemote = in->pTemplate.pTemplate_val;
		unwrap_CK_ATTRIBUTE(pLocal, pRemote, &(in->usAttributeCount));
	}
	usAttributeCount = in->usAttributeCount;
	if (in->phKey == NULL) {
		phKey = NULL;
	}
	else {
		phKey = malloc(sizeof(CK_OBJECT_HANDLE));
		memcpy(phKey, in->phKey, sizeof(CK_OBJECT_HANDLE));
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_UnwrapKey(hSession,pMechanism,hUnwrappingKey,pWrappedKey,usWrappedKeyLen,pTemplate,usAttributeCount,phKey);
	// Free Wrapping
	free(out.pMechanism->pParameter.pParameter_val);
	out.pMechanism->pParameter.pParameter_val = NULL;
	free(out.pMechanism);
	out.pMechanism = NULL;
	free(out.pWrappedKey.pWrappedKey_val);
	out.pWrappedKey.pWrappedKey_val = NULL;
	if (out.pTemplate.pTemplate_val != NULL) {
		REMOTE_CK_ATTRIBUTE *pRemote = out.pTemplate.pTemplate_val;
		free_wrap_CK_ATTRIBUTE(pRemote, (int) out.pTemplate.pTemplate_len);
	}
	free(out.pTemplate.pTemplate_val);
	out.pTemplate.pTemplate_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pMechanism == NULL) {
		out.pMechanism = NULL;
	}
	else {
		out.pMechanism = malloc(sizeof(REMOTE_CK_MECHANISM));
		out.pMechanism->mechanism = pMechanism->mechanism;
		if (pMechanism->pParameter == NULL) {
			out.pMechanism->pParameter.pParameter_val = NULL;
			out.pMechanism->pParameter.pParameter_len = 0;
		}
		else {
			out.pMechanism->pParameter.pParameter_val = malloc(sizeof(REMOTE_CK_VOID_PTR) * pMechanism->ulParameterLen);
			memcpy(out.pMechanism->pParameter.pParameter_val, pMechanism->pParameter, sizeof(CK_VOID_PTR) * pMechanism->ulParameterLen);
		}
		out.pMechanism->ulParameterLen = pMechanism->ulParameterLen;
	}
	out.hUnwrappingKey = hUnwrappingKey;
	if (pWrappedKey == NULL) {
		out.pWrappedKey.pWrappedKey_val = NULL;
		out.pWrappedKey.pWrappedKey_len = 0;
	}
	else {
		out.pWrappedKey.pWrappedKey_val = malloc(sizeof(REMOTE_CK_BYTE) * usWrappedKeyLen);
		memcpy(out.pWrappedKey.pWrappedKey_val, pWrappedKey, sizeof(CK_BYTE) * usWrappedKeyLen);
	}
	out.usWrappedKeyLen = usWrappedKeyLen;
	if (pTemplate == NULL) {
		out.pTemplate.pTemplate_val = NULL;
		out.pTemplate.pTemplate_len = 0;
	}
	else {
		out.pTemplate.pTemplate_val = malloc(sizeof(REMOTE_CK_ATTRIBUTE) * usAttributeCount);
		CK_ATTRIBUTE *pLocal = pTemplate;
		REMOTE_CK_ATTRIBUTE *pRemote = out.pTemplate.pTemplate_val;
		wrap_CK_ATTRIBUTE(pLocal, pRemote, &usAttributeCount);
	}
	out.usAttributeCount = usAttributeCount;
	out.phKey = phKey;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_DeriveKey_Param * r_ck_c_derivekey_1(R_CK_C_DeriveKey_Param *param, CLIENT *cl) {
}
R_CK_C_DeriveKey_Param * r_ck_c_derivekey_1_svc(R_CK_C_DeriveKey_Param *in, struct svc_req *req) {
	printf("CK_C_DeriveKey\n");
	fflush(stdin);
	static R_CK_C_DeriveKey_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_MECHANISM_PTR pMechanism;
	static CK_OBJECT_HANDLE hBaseKey;
	static CK_ATTRIBUTE_PTR pTemplate;
	static CK_ULONG usAttributeCount;
	static CK_OBJECT_HANDLE_PTR phKey;
	// Free Unwrapping
	free(pMechanism->pParameter);
	pMechanism->pParameter = NULL;
	free(pMechanism);
	pMechanism = NULL;
	if (pTemplate != NULL) {
		CK_ATTRIBUTE *pLocal = pTemplate;
		free_unwrap_CK_ATTRIBUTE(pLocal, (int) usAttributeCount);
	}
	free(pTemplate);
	pTemplate = NULL;
	free(phKey);
	phKey = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pMechanism == NULL) {
		pMechanism = NULL;
	}
	else {
		pMechanism = malloc(sizeof(CK_MECHANISM));
		pMechanism->mechanism = in->pMechanism->mechanism;
		if (in->pMechanism->pParameter.pParameter_len == 0) {
			pMechanism->pParameter = NULL;
		}
		else {
			pMechanism->pParameter = malloc(sizeof(CK_BYTE) * in->pMechanism->pParameter.pParameter_len);
			memcpy(pMechanism->pParameter, in->pMechanism->pParameter.pParameter_val, sizeof(CK_BYTE) * in->pMechanism->pParameter.pParameter_len);
		}
		pMechanism->ulParameterLen = in->pMechanism->ulParameterLen;
	}
	hBaseKey = in->hBaseKey;
	if (in->pTemplate.pTemplate_len == 0) {
		pTemplate = NULL;
	}
	else {
		pTemplate = malloc(sizeof(CK_ATTRIBUTE) * in->pTemplate.pTemplate_len);
		CK_ATTRIBUTE *pLocal = pTemplate;
		REMOTE_CK_ATTRIBUTE *pRemote = in->pTemplate.pTemplate_val;
		unwrap_CK_ATTRIBUTE(pLocal, pRemote, &(in->usAttributeCount));
	}
	usAttributeCount = in->usAttributeCount;
	if (in->phKey == NULL) {
		phKey = NULL;
	}
	else {
		phKey = malloc(sizeof(CK_OBJECT_HANDLE));
		memcpy(phKey, in->phKey, sizeof(CK_OBJECT_HANDLE));
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_DeriveKey(hSession,pMechanism,hBaseKey,pTemplate,usAttributeCount,phKey);
	// Free Wrapping
	free(out.pMechanism->pParameter.pParameter_val);
	out.pMechanism->pParameter.pParameter_val = NULL;
	free(out.pMechanism);
	out.pMechanism = NULL;
	if (out.pTemplate.pTemplate_val != NULL) {
		REMOTE_CK_ATTRIBUTE *pRemote = out.pTemplate.pTemplate_val;
		free_wrap_CK_ATTRIBUTE(pRemote, (int) out.pTemplate.pTemplate_len);
	}
	free(out.pTemplate.pTemplate_val);
	out.pTemplate.pTemplate_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pMechanism == NULL) {
		out.pMechanism = NULL;
	}
	else {
		out.pMechanism = malloc(sizeof(REMOTE_CK_MECHANISM));
		out.pMechanism->mechanism = pMechanism->mechanism;
		if (pMechanism->pParameter == NULL) {
			out.pMechanism->pParameter.pParameter_val = NULL;
			out.pMechanism->pParameter.pParameter_len = 0;
		}
		else {
			out.pMechanism->pParameter.pParameter_val = malloc(sizeof(REMOTE_CK_VOID_PTR) * pMechanism->ulParameterLen);
			memcpy(out.pMechanism->pParameter.pParameter_val, pMechanism->pParameter, sizeof(CK_VOID_PTR) * pMechanism->ulParameterLen);
		}
		out.pMechanism->ulParameterLen = pMechanism->ulParameterLen;
	}
	out.hBaseKey = hBaseKey;
	if (pTemplate == NULL) {
		out.pTemplate.pTemplate_val = NULL;
		out.pTemplate.pTemplate_len = 0;
	}
	else {
		out.pTemplate.pTemplate_val = malloc(sizeof(REMOTE_CK_ATTRIBUTE) * usAttributeCount);
		CK_ATTRIBUTE *pLocal = pTemplate;
		REMOTE_CK_ATTRIBUTE *pRemote = out.pTemplate.pTemplate_val;
		wrap_CK_ATTRIBUTE(pLocal, pRemote, &usAttributeCount);
	}
	out.usAttributeCount = usAttributeCount;
	out.phKey = phKey;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_SeedRandom_Param * r_ck_c_seedrandom_1(R_CK_C_SeedRandom_Param *param, CLIENT *cl) {
}
R_CK_C_SeedRandom_Param * r_ck_c_seedrandom_1_svc(R_CK_C_SeedRandom_Param *in, struct svc_req *req) {
	printf("CK_C_SeedRandom\n");
	fflush(stdin);
	static R_CK_C_SeedRandom_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_BYTE_PTR pSeed;
	static CK_ULONG usSeedLen;
	// Free Unwrapping
	free(pSeed);
	pSeed = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pSeed.pSeed_len == 0) {
		pSeed = NULL;
	}
	else {
		pSeed = malloc(sizeof(CK_BYTE) * in->pSeed.pSeed_len);
		memcpy(pSeed, in->pSeed.pSeed_val, sizeof(CK_BYTE) * in->pSeed.pSeed_len);
	}
	usSeedLen = in->usSeedLen;
	// End Unwrapping
	//Remote calling
	CK_RV res = C_SeedRandom(hSession,pSeed,usSeedLen);
	// Free Wrapping
	free(out.pSeed.pSeed_val);
	out.pSeed.pSeed_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pSeed == NULL) {
		out.pSeed.pSeed_val = NULL;
		out.pSeed.pSeed_len = 0;
	}
	else {
		out.pSeed.pSeed_val = malloc(sizeof(REMOTE_CK_BYTE) * usSeedLen);
		memcpy(out.pSeed.pSeed_val, pSeed, sizeof(CK_BYTE) * usSeedLen);
	}
	out.usSeedLen = usSeedLen;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_GenerateRandom_Param * r_ck_c_generaterandom_1(R_CK_C_GenerateRandom_Param *param, CLIENT *cl) {
}
R_CK_C_GenerateRandom_Param * r_ck_c_generaterandom_1_svc(R_CK_C_GenerateRandom_Param *in, struct svc_req *req) {
	printf("CK_C_GenerateRandom\n");
	fflush(stdin);
	static R_CK_C_GenerateRandom_Param out;
	static CK_SESSION_HANDLE hSession;
	static CK_BYTE_PTR pRandomData;
	static CK_ULONG usRandomLen;
	// Free Unwrapping
	free(pRandomData);
	pRandomData = NULL;
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	if (in->pRandomData.pRandomData_len == 0) {
		pRandomData = NULL;
	}
	else {
		pRandomData = malloc(sizeof(CK_BYTE) * in->pRandomData.pRandomData_len);
		memcpy(pRandomData, in->pRandomData.pRandomData_val, sizeof(CK_BYTE) * in->pRandomData.pRandomData_len);
	}
	usRandomLen = in->usRandomLen;
	// End Unwrapping
	//Remote calling
	CK_RV res = C_GenerateRandom(hSession,pRandomData,usRandomLen);
	// Free Wrapping
	free(out.pRandomData.pRandomData_val);
	out.pRandomData.pRandomData_val = NULL;
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	if (pRandomData == NULL) {
		out.pRandomData.pRandomData_val = NULL;
		out.pRandomData.pRandomData_len = 0;
	}
	else {
		out.pRandomData.pRandomData_val = malloc(sizeof(REMOTE_CK_BYTE) * usRandomLen);
		memcpy(out.pRandomData.pRandomData_val, pRandomData, sizeof(CK_BYTE) * usRandomLen);
	}
	out.usRandomLen = usRandomLen;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_GetFunctionStatus_Param * r_ck_c_getfunctionstatus_1(R_CK_C_GetFunctionStatus_Param *param, CLIENT *cl) {
}
R_CK_C_GetFunctionStatus_Param * r_ck_c_getfunctionstatus_1_svc(R_CK_C_GetFunctionStatus_Param *in, struct svc_req *req) {
	printf("CK_C_GetFunctionStatus\n");
	fflush(stdin);
	static R_CK_C_GetFunctionStatus_Param out;
	static CK_SESSION_HANDLE hSession;
	// Free Unwrapping
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	// End Unwrapping
	//Remote calling
	CK_RV res = C_GetFunctionStatus(hSession);
	// Free Wrapping
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_CancelFunction_Param * r_ck_c_cancelfunction_1(R_CK_C_CancelFunction_Param *param, CLIENT *cl) {
}
R_CK_C_CancelFunction_Param * r_ck_c_cancelfunction_1_svc(R_CK_C_CancelFunction_Param *in, struct svc_req *req) {
	printf("CK_C_CancelFunction\n");
	fflush(stdin);
	static R_CK_C_CancelFunction_Param out;
	static CK_SESSION_HANDLE hSession;
	// Free Unwrapping
	// End Free Unwrapping
	// Unwrapping
	hSession = in->hSession;
	// End Unwrapping
	//Remote calling
	CK_RV res = C_CancelFunction(hSession);
	// Free Wrapping
	// End Free Wrapping
	// Wrapping
	out.hSession = hSession;
	// End Wrapping
	out.return_value = res;
	return &out;
}


R_CK_C_WaitForSlotEvent_Param * r_ck_c_waitforslotevent_1(R_CK_C_WaitForSlotEvent_Param *param, CLIENT *cl) {
}
R_CK_C_WaitForSlotEvent_Param * r_ck_c_waitforslotevent_1_svc(R_CK_C_WaitForSlotEvent_Param *in, struct svc_req *req) {
	printf("CK_C_WaitForSlotEvent\n");
	fflush(stdin);
	static R_CK_C_WaitForSlotEvent_Param out;
	static CK_FLAGS flags;
	static CK_SLOT_ID_PTR pSlot;
	static CK_VOID_PTR pReserved;
	// Free Unwrapping
	free(pSlot);
	pSlot = NULL;
	free(pReserved);
	pReserved = NULL;
	// End Free Unwrapping
	// Unwrapping
	flags = in->flags;
	if (in->pSlot == NULL) {
		pSlot = NULL;
	}
	else {
		pSlot = malloc(sizeof(CK_SLOT_ID));
		memcpy(pSlot, in->pSlot, sizeof(CK_SLOT_ID));
	}
	if (in->pReserved == NULL) {
		pReserved = NULL;
	}
	else {
		pReserved = malloc(sizeof(int));
		memcpy(pReserved, in->pReserved, sizeof(int));
	}
	// End Unwrapping
	//Remote calling
	CK_RV res = C_WaitForSlotEvent(flags,pSlot,pReserved);
	// Free Wrapping
	// End Free Wrapping
	// Wrapping
	out.flags = flags;
	out.pSlot = pSlot;
	out.pReserved = pReserved;
	// End Wrapping
	out.return_value = res;
	return &out;
}


